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

@@ -448,7 +448,7 @@ define([
updateDefaultTitle(peerMetadata.metadata.defaultTitle);
}
if (typeof peerMetadata.metadata.title !== "undefined") {
updateTitle(peerMetadata.metadata.title);
updateTitle(peerMetadata.metadata.title || defaultName);
}
}
};
@@ -622,15 +622,6 @@ define([
// set the hash
if (!readOnly) { Cryptpad.replaceHash(editHash); }
Cryptpad.getPadTitle(function (err, title) {
if (err) {
console.error(err);
console.log("Couldn't get pad title");
return;
}
updateTitle(title || defaultName);
});
};
// this should only ever get called once, when the chain syncs