Prevent chainpad issues to reset spreadsheets content

pull/1/head
yflory 4 years ago
parent 9f94126516
commit 8874f2fdb1

@ -2166,6 +2166,12 @@ define([
url: newLatest.file
}, function () { });
newDoc = !content.hashes || Object.keys(content.hashes).length === 0;
} else if (!privateData.isNewFile) {
// This is an empty doc but not a new file: error
UI.errorLoadingScreen(Messages.unableToDisplay, false, function () {
common.gotoURL('');
});
throw new Error("Empty chainpad for a non-empty doc");
} else {
Title.updateTitle(Title.defaultTitle);
}

Loading…
Cancel
Save