mirror of
https://github.com/google/blockly.git
synced 2026-01-12 03:17:09 +01:00
fix: shadow blocks with variable fields are not allowed to be deserialized from XML (#7802)
This commit is contained in:
@@ -995,10 +995,7 @@ function domToBlockHeadless(
|
||||
throw TypeError('Shadow block not allowed non-shadow child.');
|
||||
}
|
||||
}
|
||||
// Ensure this block doesn't have any variable inputs.
|
||||
if (block.getVarModels().length) {
|
||||
throw TypeError('Shadow blocks cannot have variable references.');
|
||||
}
|
||||
|
||||
block.setShadow(true);
|
||||
}
|
||||
return block;
|
||||
|
||||
Reference in New Issue
Block a user