mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
Add a console warning for defining a toolbox using JSON (#3937)
This commit is contained in:
@@ -99,6 +99,8 @@ Blockly.utils.toolbox.convertToolboxToJSON = function(toolboxDef) {
|
||||
}
|
||||
// If it is an array of JSON, then it is already in the correct format.
|
||||
if (Array.isArray(toolboxDef) && toolboxDef.length && !(toolboxDef[0].nodeType)) {
|
||||
console.warn('Due to some performance issues, defining a toolbox using JSON is not' +
|
||||
' ready yet. Please define your toolbox using xml.');
|
||||
return /** @type {!Array.<Blockly.utils.toolbox.Toolbox>} */ (toolboxDef);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user