mirror of
https://github.com/excalidraw/excalidraw.git
synced 2026-12-03 10:00:31 +03:00
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>