mirror of
https://github.com/Doodle3D/Doodle3D-Transform.git
synced 2024-11-25 15:07:56 +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 => {
|
window.onbeforeunload = event => {
|
||||||
const state = store.getState();
|
const state = store.getState();
|
||||||
|
|
||||||
if (state.files.current.unSavedData) {
|
if (state.files.current && state.files.current.unSavedData) {
|
||||||
event.returnValue = 'You have unsaved work';
|
event.returnValue = 'You have unsaved work';
|
||||||
return event.returnValue;
|
return event.returnValue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user