fix duplicated page parenting (#1692)

This commit is contained in:
Philip Okugbe
2025-10-23 15:00:11 +01:00
committed by GitHub
parent 042836cb6d
commit f5684b792e
@@ -381,9 +381,9 @@ export class PageService {
workspaceId: page.workspaceId, workspaceId: page.workspaceId,
creatorId: authUser.id, creatorId: authUser.id,
lastUpdatedById: authUser.id, lastUpdatedById: authUser.id,
parentPageId: page.parentPageId parentPageId: page.id === rootPage.id
? pageMap.get(page.parentPageId)?.newPageId ? (isDuplicateInSameSpace ? rootPage.parentPageId : null)
: null, : (page.parentPageId ? pageMap.get(page.parentPageId)?.newPageId : null),
}; };
}), }),
); );