From e6398bac21ebd146de45cb6777985c678e0ad88b Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 10 Aug 2017 15:16:30 -0400 Subject: [PATCH] Accept no arguments for `NavItem` options --- app/assets/javascripts/discourse/models/nav-item.js.es6 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/assets/javascripts/discourse/models/nav-item.js.es6 b/app/assets/javascripts/discourse/models/nav-item.js.es6 index 03cc8145c80..c41f33b544d 100644 --- a/app/assets/javascripts/discourse/models/nav-item.js.es6 +++ b/app/assets/javascripts/discourse/models/nav-item.js.es6 @@ -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;