Skip to content

Commit 5a6f04d

Browse files
authored
xml.js -- dont warn about drag duplicate fields
1 parent a5cd267 commit 5a6f04d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

core/xml.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -885,8 +885,10 @@ Blockly.Xml.domToFieldVariable_ = function(workspace, xml, text, field) {
885885
Blockly.Xml.domToField_ = function(block, fieldName, xml) {
886886
var field = block.getField(fieldName);
887887
if (!field) {
888-
console.warn('Ignoring non-existent field ' + fieldName + ' in block ' +
889-
block.type);
888+
// dont expect fields in drag duplicates
889+
if (!block.canDragDuplicate_) {
890+
console.warn('Ignoring non-existent field ' + fieldName + ' in block ' + block.type, block);
891+
}
890892
return;
891893
}
892894

0 commit comments

Comments
 (0)