Doc: Fix detection whether documentation is empty
This commit is contained in:
parent
720e022bea
commit
dad9538496
|
@ -84,4 +84,14 @@ class TreeNodeIterator implements RecursiveIterator
|
|||
{
|
||||
return new static($this->current());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get whether the iterator is empty
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmpty()
|
||||
{
|
||||
return empty($this->children);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ class DocTocRenderer extends DocRenderer
|
|||
*/
|
||||
public function render()
|
||||
{
|
||||
if (empty($this->content)) {
|
||||
if ($this->getInnerIterator()->isEmpty()) {
|
||||
return '<p>' . mt('doc', 'Documentation is empty.') . '</p>';
|
||||
}
|
||||
$view = $this->getView();
|
||||
|
|
Loading…
Reference in New Issue