diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d51c2189..419295374 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ title: Changelog ## Unreleased +### Bug Fixes + +- Fix restoration of groups/categories including documents, #2801. + ## v0.27.4 (2024-12-09) ### Features diff --git a/src/lib/models/ReflectionCategory.ts b/src/lib/models/ReflectionCategory.ts index 2812dd8bf..9a28ccc0b 100644 --- a/src/lib/models/ReflectionCategory.ts +++ b/src/lib/models/ReflectionCategory.ts @@ -76,7 +76,7 @@ export class ReflectionCategory { const child = project.getReflectionById( de.oldIdToNewId[childId] ?? -1, ); - if (child?.isDeclaration()) { + if (child?.isDeclaration() || child?.isDocument()) { this.children.push(child); } } diff --git a/src/lib/models/ReflectionGroup.ts b/src/lib/models/ReflectionGroup.ts index c72d2f810..431525ced 100644 --- a/src/lib/models/ReflectionGroup.ts +++ b/src/lib/models/ReflectionGroup.ts @@ -96,7 +96,7 @@ export class ReflectionGroup { const child = project.getReflectionById( de.oldIdToNewId[childId] ?? -1, ); - if (child?.isDeclaration()) { + if (child?.isDeclaration() || child?.isDocument()) { this.children.push(child); } }