Compare commits

...

2 Commits

Author SHA1 Message Date
taranvohra aa8ce625cf slice(1) 2024-10-03 15:09:36 +05:30
taranvohra 6fa11ebc2e wip 2024-10-03 15:06:57 +05:30
+4
View File
@@ -19,6 +19,10 @@ export function resolvePagePath(
}
if (page.path !== pagePath) {
if (page.path.split('/').slice(1).join('/') === pagePath) {
return resolvePageDocument(page, ancestors);
}
// TODO: can be optimized to count the number of slashes and skip the entire subtree
const result = iteratePages(page.pages, [...ancestors, page]);
if (result) {