This line references to `subPanels` which id declared in another scope. It works but looks weird. Suggest to move this line into the scope of `if (panel.dataset.requireSubPanels)` if `subPanel` is only used in that scope.