Skip to content

Commit 060746f

Browse files
authored
Merge pull request #305 from germanocaumo/fix-crash-mobile
fix(tldraw-v2): crash in mobile views
2 parents c857372 + 6e2ceff commit 060746f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/components/tldraw_v2/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ const TldrawPresentationV2 = ({ size }) => {
121121
}
122122

123123
React.useEffect(() => {
124+
if (size.width <= 0 || size.height <= 0) {
125+
return;
126+
}
124127
let zoom =
125128
Math.min(
126129
svgWidth / viewboxWidth,

0 commit comments

Comments
 (0)