mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 15:11:31 +08:00 
			
		
		
		
	if note doesn't exist we don't try to activate it
This commit is contained in:
		
							parent
							
								
									6edaf0ed00
								
							
						
					
					
						commit
						df69dbb2e1
					
				@ -5,7 +5,8 @@ const messaging = (function() {
 | 
				
			|||||||
    let ws = null;
 | 
					    let ws = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    function logError(message) {
 | 
					    function logError(message) {
 | 
				
			||||||
        console.trace(message);
 | 
					        console.log(message); // needs to be separate from .trace()
 | 
				
			||||||
 | 
					        console.trace();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (ws && ws.readyState === 1) {
 | 
					        if (ws && ws.readyState === 1) {
 | 
				
			||||||
            ws.send(JSON.stringify({
 | 
					            ws.send(JSON.stringify({
 | 
				
			||||||
 | 
				
			|||||||
@ -412,6 +412,13 @@ const noteTree = (function() {
 | 
				
			|||||||
                setExpandedToServer(data.node.data.note_tree_id, false);
 | 
					                setExpandedToServer(data.node.data.note_tree_id, false);
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            init: (event, data) => {
 | 
					            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) {
 | 
					                if (startNotePath) {
 | 
				
			||||||
                    activateNode(startNotePath);
 | 
					                    activateNode(startNotePath);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
				
			|||||||
@ -265,7 +265,7 @@ async function checkContentHash(syncContext) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    for (const key in hashes) {
 | 
					    for (const key in hashes) {
 | 
				
			||||||
        if (hashes[key] !== resp.hashes[key]) {
 | 
					        if (hashes[key] !== resp.hashes[key]) {
 | 
				
			||||||
            allChecksPassed = true;
 | 
					            allChecksPassed = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            await event_log.addEvent(`Content hash check for ${key} FAILED. Local is ${hashes[key]}, remote is ${resp.hashes[key]}`);
 | 
					            await event_log.addEvent(`Content hash check for ${key} FAILED. Local is ${hashes[key]}, remote is ${resp.hashes[key]}`);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user