Simplify agent renaming

This commit is contained in:
Jürg Lehni 2019-06-11 21:31:28 +02:00
parent 0a56c7cef0
commit 900a207954

View file

@ -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;
}