mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Check for NaN before applying styles
This commit is contained in:
parent
0a3675e1b9
commit
93d0a56bdb
1 changed files with 9 additions and 0 deletions
|
@ -58,6 +58,15 @@ const MinimapViewport = ({
|
|||
height + top,
|
||||
);
|
||||
|
||||
if (
|
||||
Number.isNaN(viewportTop) ||
|
||||
Number.isNaN(viewportLeft) ||
|
||||
Number.isNaN(viewportWidth) ||
|
||||
Number.isNaN(viewportHeight)
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue