Files
excalidraw/packages
Mark Tolmacs 28adc14480 fix(restore): reset non-finite scroll and zoom values
The viewport comes from untrusted input, and a non-finite `scrollX`,
`scrollY` or zoom leaves the canvas unrenderable with no way for the
user to recover. Fall back to the defaults for those, accepting numeric
strings.

The zoom was already normalized by `getNormalizedZoom`, but it clamps
with `Math.min`/`Math.max`, which pass `NaN` straight through, so the
value is now checked before it gets there.

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2026-10-21 08:20:42 +00:00
..