21225: Fix check for empty object
[arvados.git] / services / workbench2 / src / components / multi-panel-view / multi-panel-view.tsx
index 10c671f05fd2adcb3ec602a198cb59b5aa743c6a..59d7b14c5d1a0763eda3a827d0eb5923eed50325 100644 (file)
@@ -162,7 +162,7 @@ type MPVContainerProps = MPVContainerDataProps & GridProps;
 
 // Grid container compatible component that also handles panel toggling.
 const MPVContainerComponent = ({ children, panelStates, classes, ...props }: MPVContainerProps & WithStyles<CssRules>) => {
-    if (children === undefined || children === null || children === {}) {
+    if (children === undefined || children === null || Object.keys(children).length === 0) {
         children = [];
     } else if (!isArray(children)) {
         children = [children];