diff --git a/src/store/layout/mutations.ts b/src/store/layout/mutations.ts index a81fb4553f..98b63eea1d 100644 --- a/src/store/layout/mutations.ts +++ b/src/store/layout/mutations.ts @@ -39,7 +39,10 @@ export const mutations: MutationTree = { const defaultLayout = defaultState.layouts[migratableLayoutKey] const defaultComponentIds = Object.values(defaultLayout).flat().map(card => card.id) const currentLayout = payload.layouts[layoutKey] - const currentComponentIds = Object.values(currentLayout).flat().map(card => card.id) + const currentComponentIds = Object.values(currentLayout) + .flat() + .filter(card => card != null) // required as we have seen null cards in the database + .map(card => card.id) for (const [containerKey, defaultContainerComponents] of Object.entries(defaultLayout)) { const currentContainerComponents = currentLayout[containerKey] || []