Fix zoom being set to NaN (#807)
* Fix zoom being set to NaN * recover zoom default value on restore if invalid Co-authored-by: David Luzar <luzar.david@gmail.com>
This commit is contained in:
@ -398,6 +398,10 @@ function restore(
|
||||
savedState = { ...savedState, ...calculateScrollCenter(elements) };
|
||||
}
|
||||
|
||||
if (savedState) {
|
||||
savedState.zoom = savedState.zoom || getDefaultAppState().zoom;
|
||||
}
|
||||
|
||||
return {
|
||||
elements: elements,
|
||||
appState: savedState,
|
||||
|
Reference in New Issue
Block a user