Attempt to handle the possible scenario where we are overwriting an existing pad with the initial content.

This commit is contained in:
Caleb James DeLisle 2017-12-12 14:30:10 +01:00
parent 0aae61f72e
commit 8582f92892
1 changed files with 7 additions and 0 deletions

View File

@ -253,6 +253,13 @@ define([
newContent = normalize(newContent);
contentUpdate(newContent);
} else {
if (!cpNfInner.metadataMgr.getPrivateData().isNewFile) {
// We're getting 'new pad' but there is an existing file
// We don't know exactly why this can happen but under no circumstances
// should we overwrite the content, so lets just try again.
common.gotoURL();
return;
}
console.log('updating title');
title.updateTitle(title.defaultTitle);
evOnDefaultContentNeeded.fire();