From 0ca50113a6e9bc2edc70850ab2bddc2b8232f9dd Mon Sep 17 00:00:00 2001 From: ambar Date: Wed, 3 Nov 2021 16:44:27 +0800 Subject: [PATCH] fix: check the existence of Proxy --- 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.