mirror of https://github.com/xwiki-labs/cryptpad
Attempt to handle the possible scenario where we are overwriting an existing pad with the initial content.
This commit is contained in:
parent
0aae61f72e
commit
8582f92892
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue