fix: getBlocksByType not filtering out insertion markers (#5430)

* maxInstance fix

* requested changes applied
This commit is contained in:
Apoorv Garg
2021-09-10 00:03:03 +05:30
committed by GitHub
parent c008bd07e8
commit dfba00701e

View File

@@ -266,7 +266,10 @@ Blockly.Workspace.prototype.getBlocksByType = function(type, ordered) {
}
blocks.sort(this.sortObjects_);
}
return blocks;
return blocks.filter(function(block) {
return !block.isInsertionMarker();
});
};
/**