mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-11-15 14:42:16 +03:00
in strict mode, this is undefined
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user