Let scratch-gui handle 'onbeforeunload'

This commit is contained in:
Christopher Willis-Ford 2018-12-12 17:07:04 -08:00
parent c9bcd14015
commit fcf629ba1c

View file

@ -18,11 +18,6 @@ document.body.appendChild(appTarget);
GUI.setAppElement(appTarget);
const WrappedGui = AppStateHOC(GUI);
if (process.env.NODE_ENV === 'production' && typeof window === 'object') {
// Warn before navigating away
window.onbeforeunload = () => true;
}
const onStorageInit = storageInstance => {
storageInstance.addHelper(new ElectronStorageHelper(storageInstance));
// storageInstance.addOfficialScratchWebStores(); // TODO: do we want this?