Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ exports.colour = colourUtils;
exports.Coordinate = Coordinate;
exports.deprecation = deprecation;
exports.dom = dom;
exports.global = global;
exports.global = global.globalThis;
exports.idGenerator = idGenerator;
exports.KeyCodes = KeyCodes;
exports.math = math;
Expand Down
1 change: 1 addition & 0 deletions scripts/migration/renamings.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ const renamings = {
},
'Blockly.utils.global': {
export: 'globalThis', // Previous default export now named.
path: 'Blockly.utils.global', // But still exported under original name.
},
'Blockly.utils.IdGenerator': {
module: 'Blockly.utils.idGenerator',
Expand Down
2 changes: 1 addition & 1 deletion scripts/package/node/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Blockly.setLocale = function (locale) {

// Override textToDomDocument and provide Node.js alternatives to DOMParser and
// XMLSerializer.
const globalThis = Blockly.utils.global.globalThis;
const globalThis = Blockly.utils.global;
if (typeof globalThis.document !== 'object') {
const jsdom = require('jsdom/lib/jsdom/living');
globalThis.DOMParser = jsdom.DOMParser;
Expand Down