diff --git a/core/blockly.js b/core/blockly.js index 558c72014..7cd0e449d 100644 --- a/core/blockly.js +++ b/core/blockly.js @@ -410,6 +410,10 @@ Blockly.defineBlocksWithJsonArray = function(jsonArray) { console.warn('Block definition #' + i + ' in JSON array is missing a type attribute. Skipping.'); } else { + if (Blockly.Blocks[typename]) { + console.warn('Block definition #' + i + + ' in JSON array overwrites prior definition of "' + typename + '".'); + } Blockly.Blocks[typename] = { init: Blockly.jsonInitFactory_(elem) };