Create console stub for IE 9.

This commit is contained in:
Neil Fraser
2016-06-22 13:00:29 -07:00
parent 685288836f
commit 91b10cae2f

View File

@@ -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'] = {};