Commit 8c14e6b
committed
fix(fov): guard canvas render against 0x0 dimensions
A ResizeObserver firing on a collapsed parent (mobile/desktop display:none
swap or a pre-layout pass) sized the canvas to 0x0, and copying a
0-dimension source canvas into cleanCanvas threw InvalidStateError. Bail
out of both draw() and the resize handler when width/height is 0, which
also preserves the last good render while the panel is hidden.
Fixes Sentry issue 7547781808.1 parent 9a5b6bd commit 8c14e6b
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
95 | 102 | | |
96 | 103 | | |
97 | 104 | | |
| |||
0 commit comments