Fix the title reset bug

This commit is contained in:
yflory
2017-01-12 14:26:10 +01:00
parent 52d5821be0
commit 4963c77b61
7 changed files with 10 additions and 40 deletions

View File

@@ -358,7 +358,7 @@ define([
updateDefaultTitle(json.metadata.defaultTitle);
}
if (typeof json.metadata.title !== "undefined") {
updateTitle(json.metadata.title);
updateTitle(json.metadata.title || defaultName);
}
}
};
@@ -500,15 +500,6 @@ define([
// set the hash
if (!readOnly) { Cryptpad.replaceHash(editHash); }
Cryptpad.getPadTitle(function (err, title) {
if (err) {
console.log("Unable to get pad title");
console.error(err);
return;
}
updateTitle(title || defaultName);
});
};
var unnotify = module.unnotify = function () {