Update index.js

This commit is contained in:
Rick Companje 2021-06-06 22:22:06 +02:00
parent 65090eecab
commit eea4651a9d
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}