@@ -340,29 +340,29 @@ export default function (options: UseNoteComposableOptions): UseNoteComposableSt
340340 }
341341
342342 /**
343- * Recursively update the note hierarchy content
343+ * Recursively update the note hierarchy title
344344 * @param hierarchy - The note hierarchy to update
345- * @param content - The new content to update in the hierarchy
345+ * @param title - The new title to update in the hierarchy
346346 */
347- function updateNoteHierarchyContent ( hierarchy : NoteHierarchy | null , content : NoteContent | null ) : void {
347+ function updateNoteHierarchyContent ( hierarchy : NoteHierarchy | null , title : string ) : void {
348348 // If hierarchy is null, there's nothing to update
349349 if ( ! hierarchy ) {
350350 return ;
351351 }
352352
353353 // If content is null, we can't update the hierarchy content
354- if ( ! content ) {
354+ if ( ! title ) {
355355 return ;
356356 }
357357
358- // Update the content of the current note in the hierarchy if it matches the currentId
359- if ( hierarchy . id === currentId . value ) {
360- hierarchy . content = content ;
358+ // Update the title of the current note in the hierarchy if it matches the currentId
359+ if ( hierarchy . noteId === currentId . value ) {
360+ hierarchy . noteTitle = title ;
361361 }
362362
363363 // Recursively update child notes
364364 if ( hierarchy . childNotes ) {
365- hierarchy . childNotes . forEach ( child => updateNoteHierarchyContent ( child , content ) ) ;
365+ hierarchy . childNotes . forEach ( child => updateNoteHierarchyContent ( child , title ) ) ;
366366 }
367367 }
368368
@@ -399,7 +399,7 @@ export default function (options: UseNoteComposableOptions): UseNoteComposableSt
399399 url : route . path ,
400400 } ) ;
401401 }
402- updateNoteHierarchyContent ( noteHierarchy . value , lastUpdateContent . value ) ;
402+ updateNoteHierarchyContent ( noteHierarchy . value , currentNoteTitle ) ;
403403 } ) ;
404404
405405 return {
0 commit comments