mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 07:58:45 +03:00
in strict mode, this
is undefined
This commit is contained in:
parent
1f4befe4c3
commit
ea9d093f0d
@ -358,7 +358,7 @@
|
||||
};
|
||||
|
||||
// check whether script is running inside node.js export as module
|
||||
if (typeof exports !== 'undefined' && this.toString() !== '[object DOMWindow]') {
|
||||
if (typeof exports !== 'undefined' && (!this || this.toString() !== '[object DOMWindow]')) {
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
exports = module.exports = UAParser;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user