diff --git a/prism.js b/prism.js index 4b9c9a0f8a..3758ddc3ae 100644 --- a/prism.js +++ b/prism.js @@ -1214,8 +1214,8 @@ if (typeof module !== 'undefined' && module.exports) { } // hack for components to work correctly in node.js -if (typeof global !== 'undefined') { - global.Prism = Prism; +if (typeof globalThis !== 'undefined') { + globalThis.Prism = Prism; } // some additional documentation/types