fix(editor): missing hierarchy in parent page

See-also #7568
pull/7572/head
Andelf 2022-12-03 04:10:10 +08:00
parent 934ed3991c
commit 2dfd93b519
1 changed files with 3 additions and 1 deletions

View File

@ -18,7 +18,9 @@
(let [repo (state/get-current-repo)
aliases (db/get-page-alias-names repo page)
all-page-names (conj aliases page)]
(when-let [page (first (filter text/namespace-page? all-page-names))]
(when-let [page (or (first (filter text/namespace-page? all-page-names))
(when (:block/_namespace (db/entity [:block/name (util/page-name-sanity-lc page)]))
page))]
(let [namespace-pages (db/get-namespace-pages repo page)
parent-routes (db-model/get-page-namespace-routes repo page)
pages (->> (concat namespace-pages parent-routes)