From 24b88358ffebdfac8f0e4bbc3dcfcdf53e9fb2d1 Mon Sep 17 00:00:00 2001 From: Nico Schett Date: Mon, 27 May 2024 10:14:15 +0200 Subject: [PATCH] fix: useJaenPageIndex handle deleted child pages Added handling of deleted child pages in useJaenPageIndex function. --- packages/jaen/package.json | 2 +- packages/jaen/src/contexts/page.tsx | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/jaen/package.json b/packages/jaen/package.json index 166ae93b..aeaf943b 100644 --- a/packages/jaen/package.json +++ b/packages/jaen/package.json @@ -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", diff --git a/packages/jaen/src/contexts/page.tsx b/packages/jaen/src/contexts/page.tsx index 9aee3424..7824e616 100644 --- a/packages/jaen/src/contexts/page.tsx +++ b/packages/jaen/src/contexts/page.tsx @@ -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)