Fix INVALID_RESPONSE error in the file app

This commit is contained in:
yflory
2018-02-16 12:02:20 +01:00
parent 54a91f1153
commit 037a6ccc35
4 changed files with 12 additions and 9 deletions

View File

@@ -132,10 +132,12 @@ define([
// Check if the pad exists on server
if (!window.location.hash) { isNewFile = true; return; }
Cryptpad.isNewChannel(window.location.href, waitFor(function (e, isNew) {
if (e) { return console.error(e); }
isNewFile = Boolean(isNew);
}));
if (realtime) {
Cryptpad.isNewChannel(window.location.href, waitFor(function (e, isNew) {
if (e) { return console.error(e); }
isNewFile = Boolean(isNew);
}));
}
}).nThen(function () {
var readOnly = secret.keys && !secret.keys.editKeyStr;
var isNewHash = true;