Commit 4c1ccf5e authored by Sara Arjona's avatar Sara Arjona Committed by jun
Browse files

Merge branch 'MDL-72934-master' of https://github.com/peterRd/moodle

parents 97730511 12ded633
...@@ -57,8 +57,9 @@ class more_menu implements renderable, templatable { ...@@ -57,8 +57,9 @@ class more_menu implements renderable, templatable {
public function export_for_template(renderer_base $output): array { public function export_for_template(renderer_base $output): array {
$data = ['navbarstyle' => $this->navbarstyle]; $data = ['navbarstyle' => $this->navbarstyle];
if ($this->haschildren) { if ($this->haschildren) {
// The node collection doesn't have anything to render so exit now.
if (!isset($this->content->children) || count($this->content->children) == 0) { if (!isset($this->content->children) || count($this->content->children) == 0) {
$data = []; return [];
} }
$data['nodecollection'] = $this->content; $data['nodecollection'] = $this->content;
} else { } else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment