Revert back to typeof to avoid ReferenceError: Can't find variable Proxy (#147)

This commit is contained in:
Christian Bach
2018-12-10 22:11:20 +01:00
committed by Michał Osadnik
parent 82f6608799
commit 74c520204f

View File

@@ -57,9 +57,10 @@ function sanitizeArgMapping(argMapping) {
},
};
const proxy = Proxy
? new Proxy({}, proxyHandler)
: createEventObjectProxyPolyfill();
const proxy =
typeof Proxy === 'function'
? new Proxy({}, proxyHandler)
: createEventObjectProxyPolyfill();
alwaysNodes.push(new AnimatedAlways(ev(proxy)));
traverse(proxy, []);
}