From 97dc89ae03b955fb92e73b5640aa8cd83304ad0f Mon Sep 17 00:00:00 2001 From: Bendeguz Date: Tue, 19 Mar 2019 10:57:36 +0100 Subject: [PATCH] FIX: When using in an AMD module with RequireJS using a namespace, it does not get packed correctly, because r.js optimizer matches the exact line containing 'function' as a string. (See r.js@26506) --- src/ua-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ua-parser.js b/src/ua-parser.js index d982c4e..ebebfd5 100755 --- a/src/ua-parser.js +++ b/src/ua-parser.js @@ -1083,7 +1083,7 @@ exports.UAParser = UAParser; } else { // requirejs env (optional) - if (typeof(define) === FUNC_TYPE && define.amd) { + if (typeof(define) === 'function' && define.amd) { define(function () { return UAParser; });