diff --git a/src/node/plugins/localSearchPlugin.ts b/src/node/plugins/localSearchPlugin.ts index 8fd1478e..76faf941 100644 --- a/src/node/plugins/localSearchPlugin.ts +++ b/src/node/plugins/localSearchPlugin.ts @@ -166,9 +166,7 @@ export async function localSearchPlugin( for await (const section of sections) { if (!section || !(section.text || section.titles)) break let { anchor, text, titles } = section - if (parentTitles.length) { - titles = [...parentTitles, ...titles] - } + titles = [...parentTitles, ...titles] const id = anchor ? [fileId, anchor].join('#') : fileId index.add({ id,