mirror of
https://github.com/google/blockly.git
synced 2026-01-04 15:40:08 +01:00
Fix UMD build in IE11 (#3158)
* Fix the UMD build in IE11. No Object.assign
This commit is contained in:
@@ -24,6 +24,9 @@
|
||||
'use strict';
|
||||
|
||||
// Add a helper method to set the Blockly locale.
|
||||
Blockly.setLocale = function(locale) {
|
||||
Blockly.Msg = Object.assign(Blockly.Msg || {}, locale);
|
||||
};
|
||||
Blockly.setLocale = function (locale) {
|
||||
Blockly.Msg = Blockly.Msg || {};
|
||||
Object.keys(locale).forEach(function (k) {
|
||||
Blockly.Msg[k] = locale[k];
|
||||
});
|
||||
};
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
// Include the EN Locale by default.
|
||||
Blockly.setLocale(En);
|
||||
|
||||
Blockly.Blocks = Object.assign(Blockly.Blocks, BlocklyBlocks);
|
||||
Blockly.Blocks = Blockly.Blocks || {};
|
||||
Object.keys(BlocklyBlocks).forEach(function (k) {
|
||||
Blockly.Blocks[k] = BlocklyBlocks[k];
|
||||
});
|
||||
|
||||
Blockly.JavaScript = BlocklyJS;
|
||||
@@ -24,6 +24,9 @@
|
||||
'use strict';
|
||||
|
||||
// Add a helper method to set the Blockly locale.
|
||||
Blockly.setLocale = function(locale) {
|
||||
Blockly.Msg = Object.assign(Blockly.Msg || {}, locale);
|
||||
};
|
||||
Blockly.setLocale = function (locale) {
|
||||
Blockly.Msg = Blockly.Msg || {};
|
||||
Object.keys(locale).forEach(function (k) {
|
||||
Blockly.Msg[k] = locale[k];
|
||||
});
|
||||
};
|
||||
|
||||
@@ -26,7 +26,10 @@
|
||||
// Include the EN Locale by default.
|
||||
Blockly.setLocale(En);
|
||||
|
||||
Blockly.Blocks = Object.assign(Blockly.Blocks, BlocklyBlocks);
|
||||
Blockly.Blocks = Blockly.Blocks || {};
|
||||
Object.keys(BlocklyBlocks).forEach(function (k) {
|
||||
Blockly.Blocks[k] = BlocklyBlocks[k];
|
||||
});
|
||||
|
||||
Blockly.JavaScript = BlocklyJS;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user