diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index 8303af71..9eb52b27 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -504,7 +504,7 @@ class LeftAndMain extends Controller { $parentID = (int)$p->ParentID; $id = $p->ID ? $p->ID : "new-$p->class-$p->ParentID"; $treeTitle = Convert::raw2js($p->TreeTitle()); - $hasChildren = is_numeric( $id ) && $p->AllChildren() ? ' unexpanded' : ''; + $hasChildren = (is_numeric($id) && $p->AllChildren() && $p->AllChildren()->Count()) ? ' unexpanded' : ''; // Ensure there is definitly a node avaliable. if not, append to the home tree. $response = <<