if note doesn't exist we don't try to activate it

This commit is contained in:
azivner
2017-12-15 21:36:21 -05:00
parent 6edaf0ed00
commit df69dbb2e1
3 changed files with 10 additions and 2 deletions
+2 -1
View File
@@ -5,7 +5,8 @@ const messaging = (function() {
let ws = null;
function logError(message) {
console.trace(message);
console.log(message); // needs to be separate from .trace()
console.trace();
if (ws && ws.readyState === 1) {
ws.send(JSON.stringify({
+7
View File
@@ -412,6 +412,13 @@ const noteTree = (function() {
setExpandedToServer(data.node.data.note_tree_id, false);
},
init: (event, data) => {
const noteId = treeUtils.getNoteIdFromNotePath(startNotePath);
if (noteIdToTitle[noteId] === undefined) {
// note doesn't exist so don't try to activate it
startNotePath = null;
}
if (startNotePath) {
activateNode(startNotePath);
}