Reexport global.globalThis as Blockly.utils.global (#5534)

Fixes #5503

This makes the value of Blockly.utils.global the same as it was
before PR #5451.
This commit is contained in:
Christopher Allen
2021-09-24 18:47:43 +01:00
committed by GitHub
parent 8ab8536739
commit f931b2eb36
3 changed files with 3 additions and 2 deletions

View File

@@ -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;