mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	fix hoisting note from empty detail screen
This commit is contained in:
		| @@ -24,6 +24,7 @@ class NoteContext extends Component { | |||||||
|         this.notePath = null; |         this.notePath = null; | ||||||
|         this.noteId = null; |         this.noteId = null; | ||||||
|         this.parentNoteId = null; |         this.parentNoteId = null; | ||||||
|  |         this.hoistedNoteId = 'root'; | ||||||
|  |  | ||||||
|         this.triggerEvent('noteSwitched', { |         this.triggerEvent('noteSwitched', { | ||||||
|             noteContext: this, |             noteContext: this, | ||||||
| @@ -165,12 +166,12 @@ class NoteContext extends Component { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     async setHoistedNoteId(noteIdToHoist) { |     async setHoistedNoteId(noteIdToHoist) { | ||||||
|         if (this.notePathArray && !this.notePathArray.includes(noteIdToHoist)) { |         this.hoistedNoteId = noteIdToHoist; | ||||||
|  |  | ||||||
|  |         if (!this.notePathArray?.includes(noteIdToHoist)) { | ||||||
|             await this.setNote(noteIdToHoist); |             await this.setNote(noteIdToHoist); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         this.hoistedNoteId = noteIdToHoist; |  | ||||||
|  |  | ||||||
|         await this.triggerEvent('hoistedNoteChanged', { |         await this.triggerEvent('hoistedNoteChanged', { | ||||||
|             noteId: noteIdToHoist, |             noteId: noteIdToHoist, | ||||||
|             ntxId: this.ntxId |             ntxId: this.ntxId | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user