motion-dom 13.0.0 → 13.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -3676,6 +3676,7 @@ function getOptimisedAppearId(visualElement) {
3676
3676
  return visualElement.props[optimizedAppearDataAttribute];
3677
3677
  }
3678
3678
 
3679
+ const isBrowser$1 = typeof window !== "undefined";
3679
3680
  /**
3680
3681
  * Decide whether we should block this animation. Previously, we achieved this
3681
3682
  * just by checking whether the key was listed in protectedKeys, but this
@@ -3739,7 +3740,7 @@ function animateTarget(visualElement, targetAndTransition, { delay = 0, transiti
3739
3740
  * to see if we're handling off from an existing animation.
3740
3741
  */
3741
3742
  let isHandoff = false;
3742
- if (window.MotionHandoffAnimation) {
3743
+ if (isBrowser$1 && window.MotionHandoffAnimation) {
3743
3744
  const appearId = getOptimisedAppearId(visualElement);
3744
3745
  if (appearId) {
3745
3746
  const startTime = window.MotionHandoffAnimation(appearId, key, frame);