[WIP] Fix bug when using function as connection check

This commit is contained in:
Evan W. Patton
2016-10-19 23:20:55 -04:00
parent 64a6f7b547
commit 189f87b32e

View File

@@ -574,7 +574,7 @@ Blockly.Connection.prototype.checkType_ = function(otherConnection) {
// or if the check is a function, evaluate the function.
for (var i = 0; i < this.check_.length; i++) {
if ((otherConnection.check_.indexOf(this.check_[i]) != -1) ||
(typeof this.check_[x] == "function" && this.check_[x](this,other))) {
(typeof this.check_[i] == "function" && this.check_[i](this,otherConnection))) {
return true;
}
}