Skip to content

Commit

Permalink
fix: check the existence of Proxy (#1330)
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Perry <mattgperry@gmail.com>
  • Loading branch information
ambar and mattgperry committed Nov 24, 2021
1 parent 0634941 commit 177827f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/render/dom/motion-proxy.ts
Expand Up @@ -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.
Expand Down

0 comments on commit 177827f

Please sign in to comment.