Skip to content

Commit b31f3c0

Browse files
author
blond
committed
fix(global): use window and global instead of this
Now to provide `bemNaming` to global scope using `this`. In NodeJS `this` link to `module.exports`, but not in `global` variables. For browsers need use `window` variable.
1 parent 27737a7 commit b31f3c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,4 +335,4 @@ if (typeof define === 'function') {
335335

336336
/* istanbul ignore next */
337337
defineAsGlobal && (global.bemNaming = createNaming);
338-
})(this);
338+
})(typeof window !== 'undefined' ? window : global);

0 commit comments

Comments
 (0)