diff --git a/core/blockly.js b/core/blockly.js index c51191b08..cda45992e 100644 --- a/core/blockly.js +++ b/core/blockly.js @@ -557,6 +557,14 @@ Blockly.getMainWorkspace = function() { return Blockly.mainWorkspace; }; +// IE9 does not have a console. Create a stub to stop errors. +if (!goog.global['console']) { + goog.global['console'] = { + 'log': function() {}, + 'warn': function() {} + }; +} + // Export symbols that would otherwise be renamed by Closure compiler. if (!goog.global['Blockly']) { goog.global['Blockly'] = {};