From 177827fdeeaee17f9ed7f5319a430da21e49e0ce Mon Sep 17 00:00:00 2001 From: ambar Date: Wed, 24 Nov 2021 18:27:33 +0800 Subject: [PATCH] fix: check the existence of Proxy (#1330) Co-authored-by: Matt Perry --- src/render/dom/motion-proxy.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/render/dom/motion-proxy.ts b/src/render/dom/motion-proxy.ts index 096b8fb3ec..9b45bf74ae 100644 --- a/src/render/dom/motion-proxy.ts +++ b/src/render/dom/motion-proxy.ts @@ -52,6 +52,10 @@ export function createMotionProxy(createConfig: CreateConfig) { >(createConfig(Component, customMotionComponentConfig)) } + if (typeof Proxy === "undefined") { + return custom as typeof custom & DOMMotionComponents + } + /** * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc. * Rather than generating them anew every render.