fix(tree): fix failure to auto-activate hoisted note

This commit is contained in:
SiriusXT 2025-11-18 19:54:50 +08:00
parent 64a756cc04
commit 9f800df5ad

View File

@ -89,7 +89,7 @@ async function resolveNotePathToSegments(notePath: string, hoistedNoteId = "root
effectivePathSegments.reverse(); effectivePathSegments.reverse();
if (effectivePathSegments.includes(hoistedNoteId)) { if (effectivePathSegments.includes(hoistedNoteId) && effectivePathSegments.includes('root')) {
return effectivePathSegments; return effectivePathSegments;
} else { } else {
const noteId = getNoteIdFromUrl(notePath); const noteId = getNoteIdFromUrl(notePath);