mirror of
https://github.com/google/blockly.git
synced 2026-01-13 11:57:10 +01:00
Fix #2131
This commit is contained in:
@@ -360,12 +360,7 @@ Blockly.Connection.prototype.canConnectToPrevious_ = function(candidate) {
|
||||
var isFirstStatementConnection = this == firstStatementConnection;
|
||||
var isNextConnection = this == this.sourceBlock_.nextConnection;
|
||||
|
||||
// Complex blocks with no previous connection will not be allowed to connect
|
||||
// mid-stack.
|
||||
var sourceHasPreviousConn = this.sourceBlock_.previousConnection != null;
|
||||
|
||||
if (isNextConnection ||
|
||||
(isFirstStatementConnection && !sourceHasPreviousConn)) {
|
||||
if (isNextConnection || isFirstStatementConnection) {
|
||||
// If the candidate is the first connection in a stack, we can connect.
|
||||
if (!candidate.targetConnection) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user