diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index b5fadc99..fa9d8cbd 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -498,7 +498,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 = <<