• Robert Knight's avatar
    Fix client on pages that define a variable called `global` · f732879a
    Robert Knight authored
    Modules which assume the existence of a global variable called "global"
    (which exists in Node) are wrapped by Browserify during the build which
    normally results in "global" being aliased to "self" or "window" in a
    browser environment.
    
    If code on the page into which H is loaded defines a global variable
    called "global" however, that gets used instead and this can break such
    modules. In the case of https://www.civilsprep.com, "global" is a
    reference to a DOM node for example.
    
    This commit fixes the issue by only aliasing "global" (as seen by the
    module using it) to either "window" or "self" and not to any existing
    variable called "global".
    
    Fixes #2723
    f732879a
Name
Last commit
Last update
h Loading commit data...
scripts Loading commit data...
.hound.yml Loading commit data...
.jscsrc Loading commit data...
.jshintignore Loading commit data...
.jshintrc Loading commit data...
gulpfile.js Loading commit data...
package.json Loading commit data...