Skip to content

Commit 90a3dfb

Browse files
authored
Discard zero snapshots (#3030)
1 parent a7926e2 commit 90a3dfb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/framer-motion/src/projection/node/create-projection-node.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,14 @@ export function createProjectionNode<I>({
827827
if (this.snapshot || !this.instance) return
828828

829829
this.snapshot = this.measure()
830+
831+
if (
832+
this.snapshot &&
833+
!calcLength(this.snapshot.measuredBox.x) &&
834+
!calcLength(this.snapshot.measuredBox.y)
835+
) {
836+
this.snapshot = undefined
837+
}
830838
}
831839

832840
updateLayout() {

0 commit comments

Comments
 (0)