Skip to content

Commit

Permalink
Filter out removed entries before counting items
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Boberg <git@axelboberg.se>
  • Loading branch information
axelboberg committed Apr 24, 2024
1 parent add70bc commit 9194c35
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion plugins/rundown/app/components/RundownGroupItem/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,13 @@ export function RundownGroupItem ({ index, item }) {
setCollapsed(!isCollapsed)
}

const itemIds = shared?.items?.[item?.id]?.children || []
const itemIds = (shared?.items?.[item?.id]?.children || [])
/*
Remove any undefined
or null entries
*/
.filter(id => id)

const isCollapsed = item?.['rundown.ui.collapsed']

return (
Expand Down

0 comments on commit 9194c35

Please sign in to comment.