mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-28 16:38:47 +03:00
Reference window as global if available
This change will use `window` by default if it exists so that `browserify` and `Webpack` builds do not need to do something like ```javascript var parser = new UAParser(window.navigator.userAgent) ``` https://github.com/faisalman/ua-parser-js/issues/84
This commit is contained in:
parent
a3e4fbe5bb
commit
f117f600ba
@ -865,4 +865,4 @@
|
||||
};
|
||||
}
|
||||
|
||||
})(this);
|
||||
})(typeof window === 'object' ? window : this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user