Remove need for require instead of requireType for Block in ASTNode (#5157)

This commit is contained in:
Monica Kozbial
2021-07-21 16:53:08 -07:00
committed by GitHub
parent 6b059205dc
commit c6650f0b83

View File

@@ -418,7 +418,7 @@ Blockly.ASTNode.prototype.findPrevForField_ = function() {
*/
Blockly.ASTNode.prototype.navigateBetweenStacks_ = function(forward) {
var curLocation = this.getLocation();
if (!(curLocation instanceof Blockly.Block)) {
if (curLocation.getSourceBlock) {
curLocation = /** @type {!Blockly.IASTNodeLocationWithBlock} */ (
curLocation).getSourceBlock();
}