Accept no arguments for `NavItem` options

This commit is contained in:
Robin Ward 2017-08-10 15:16:30 -04:00
parent 3c538270e4
commit e6398bac21
1 changed files with 2 additions and 0 deletions

View File

@ -108,6 +108,8 @@ NavItem.reopenClass({
testName = name.split("/")[0],
anonymous = !Discourse.User.current();
opts = opts || {};
if (anonymous && !Discourse.Site.currentProp('anonymous_top_menu_items').includes(testName)) return null;
if (!Discourse.Category.list() && testName === "categories") return null;
if (!Discourse.Site.currentProp('top_menu_items').includes(testName)) return null;