From 900a20795491c2d0893fba21409ab6bf05084db9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 11 Jun 2019 21:31:28 +0200 Subject: [PATCH] Simplify agent renaming --- src/core/PaperScope.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/core/PaperScope.js b/src/core/PaperScope.js index 28cd219d..1d066707 100644 --- a/src/core/PaperScope.js +++ b/src/core/PaperScope.js @@ -95,9 +95,7 @@ var PaperScope = Base.extend(/** @lends PaperScope# */{ /^(node|trident)$/.test(n) ? rv : v1; agent.version = v; agent.versionNumber = parseFloat(v); - n = n === 'trident' ? 'msie' - : n === 'jsdom' ? 'node' - : n; + n = { trident: 'msie', jsdom: 'node' }[n] || n; agent.name = n; agent[n] = true; }