Permalink
Browse files

perf(reportedcontent): only load JS if menu item is rendered

Reportedcontent would continue to load the JS AMD module even if the extras
menu item was unregistered

Refs #9514
  • Loading branch information...
hypeJunction committed Mar 22, 2016
1 parent 46c3ead commit ececa98d3520483d0d4f956f0461e8d30d2db3f2
Showing with 1 addition and 2 deletions.
  1. +1 −2 mod/reportedcontent/start.php
@@ -21,8 +21,6 @@ function reportedcontent_init() {
if (elgg_is_logged_in()) {
elgg_require_js('elgg/reportedcontent');
// Extend footer with report content link
elgg_register_menu_item('extras', array(
'name' => 'report_this',
@@ -32,6 +30,7 @@ function reportedcontent_init() {
'priority' => 500,
'section' => 'default',
'link_class' => 'elgg-lightbox',
'deps' => 'elgg/reportedcontent',
));
}

0 comments on commit ececa98

Please sign in to comment.