Don't rely on Node.js global object
If `global` is used and handlebars is compiled for browser usage without a Node.js `global` polyfill, handlebars fails with a `global is undefined` error. Fixes #1593
This commit is contained in:
committed by
Jay Linski
parent
8eefee56ff
commit
2954e7ea66
@@ -1,6 +1,6 @@
|
||||
export default function(Handlebars) {
|
||||
/* istanbul ignore next */
|
||||
let root = typeof global !== 'undefined' ? global : window,
|
||||
let root = typeof global !== 'undefined' ? global : window, // eslint-disable-line no-undef
|
||||
$Handlebars = root.Handlebars;
|
||||
/* istanbul ignore next */
|
||||
Handlebars.noConflict = function() {
|
||||
|
||||
Reference in New Issue
Block a user