fix (runtime): frontend crash when quitting without saving

Uncaught TypeError: Cannot read properties of undefined (reading 'then')

ide.js:43 Uncaught TypeError: Cannot read properties of undefined (reading 'then')
    at Object.no (ide.js:43:21)
    at ModalConfirm.no (confirm.js:39:28)
This commit is contained in:
Mickael Kerjean 2022-05-14 01:39:46 +10:00
parent f72b630e50
commit 2684dd26db

View file

@ -82,6 +82,7 @@ export function ViewerPageComponent({ error, subscribe, unsubscribe, match, loca
const needSaving = (bool) => {
setState({ needSaving: bool });
return Promise.resolve();
};
useEffect(() => {