From de5139ad839537b8aa2cfedfb215fba5cc1e6ab9 Mon Sep 17 00:00:00 2001 From: Clinton Graham Date: Tue, 7 Jun 2022 17:23:53 -0400 Subject: [PATCH] discoverygarden#82: ignore otherlevel containers --- includes/jstreebuilder.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/jstreebuilder.inc b/includes/jstreebuilder.inc index e9fc76b..23192b9 100644 --- a/includes/jstreebuilder.inc +++ b/includes/jstreebuilder.inc @@ -62,7 +62,10 @@ class JSTreeBuilder { $list = $this->xpath->query($query, $node); $roots = array(); foreach ($list as $component) { - $roots[] = $this->getComponentTree($component); + $root = $this->getComponentTree($component); + if ($root) { + $roots[] = $root; + } } return $roots; }