Skip to content

Commit

Permalink
fix: useJaenPageIndex handle deleted child pages
Browse files Browse the repository at this point in the history
Added handling of deleted child pages in useJaenPageIndex function.
  • Loading branch information
schettn committed May 27, 2024
1 parent 811f9c0 commit 24b8835
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/jaen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@atsnek/jaen",
"version": "1.0.0-rc.83",
"version": "1.0.0-rc.87",
"description": "The Webapps framework for creating scalable and dynamic applications with ease.",
"type": "module",
"source": "src/index.ts",
Expand Down
7 changes: 2 additions & 5 deletions packages/jaen/src/contexts/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,10 @@ export const useJaenPageIndex = (
const actualPages = []

for (const {id, deleted} of page.childPages) {
if (deleted) {
continue
}

const actualChild = {
...state.page.pages.nodes[id],
id
id,
deleted
}
if (actualChild) {
actualPages.push(actualChild)
Expand Down

0 comments on commit 24b8835

Please sign in to comment.