mirror of
https://github.com/Doodle3D/Doodle3D-Transform.git
synced 2024-11-22 13:37:57 +01:00
Update index.js
This commit is contained in:
parent
65090eecab
commit
eea4651a9d
@ -52,7 +52,7 @@ const history = syncHistoryWithStore(envs.platform === 'ios-app' ? hashHistory :
|
||||
window.onbeforeunload = event => {
|
||||
const state = store.getState();
|
||||
|
||||
if (state.files.current.unSavedData) {
|
||||
if (state.files.current && state.files.current.unSavedData) {
|
||||
event.returnValue = 'You have unsaved work';
|
||||
return event.returnValue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user