From 74c520204f5151f9bab1dc0e04745e91aa84c00b Mon Sep 17 00:00:00 2001 From: Christian Bach Date: Mon, 10 Dec 2018 22:11:20 +0100 Subject: [PATCH] Revert back to typeof to avoid ReferenceError: Can't find variable Proxy (#147) --- src/core/AnimatedEvent.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/AnimatedEvent.js b/src/core/AnimatedEvent.js index fb17b69..9623e57 100644 --- a/src/core/AnimatedEvent.js +++ b/src/core/AnimatedEvent.js @@ -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, []); }