We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 236f582 commit 138af6aCopy full SHA for 138af6a
lib/handlebars/no-conflict.js
@@ -1,11 +1,10 @@
1
-export default function(Handlebars) {
+export default function (Handlebars) {
2
+ let $Handlebars = globalThis.Handlebars;
3
+
4
/* istanbul ignore next */
- let root = typeof global !== 'undefined' ? global : window, // eslint-disable-line no-undef
- $Handlebars = root.Handlebars;
5
- /* istanbul ignore next */
6
- Handlebars.noConflict = function() {
7
- if (root.Handlebars === Handlebars) {
8
- root.Handlebars = $Handlebars;
+ Handlebars.noConflict = function () {
+ if (globalThis.Handlebars === Handlebars) {
+ globalThis.Handlebars = $Handlebars;
9
}
10
return Handlebars;
11
};
0 commit comments