This commit is contained in:
Jan Prochazka 2021-01-14 16:23:30 +01:00
parent 93af08626a
commit cac85d776a

View File

@ -48,7 +48,7 @@ export default function WidgetColumnBar({ children, onChangeCollapsedWidgets = u
);
const toggleCollapsed = (name) => {
// skip collapse last uncollapsed item
if (!childArray.find((x) => x.props.name != name && !collapsedWidgets.includes(x.props.name))) return;
if (!childArray.find((x) => x.props && x.props.name != name && !collapsedWidgets.includes(x.props.name))) return;
if (collapsedWidgets.includes(name)) setCollapsedWidgets(collapsedWidgets.filter((x) => x != name));
else setCollapsedWidgets([...collapsedWidgets, name]);