DEV: Commas in top_menu items are no longer used

According to eviltrout, commas and pipes were the delimiters of a
Discourse specific microformat, but this is no longer the case and
hasn't been for some time.
This commit is contained in:
Daniel Waterworth 2019-11-13 16:21:07 +00:00
parent 481efebe76
commit e98d94f17f
1 changed files with 2 additions and 4 deletions

View File

@ -99,9 +99,7 @@ NavItem.reopenClass({
// create a nav item from the text, will return null if there is not valid nav item for this particular text
fromText(text, opts) {
var split = text.split(","),
name = split[0],
testName = name.split("/")[0],
var testName = text.split("/")[0],
anonymous = !Discourse.User.current();
opts = opts || {};
@ -116,7 +114,7 @@ NavItem.reopenClass({
if (!Discourse.Site.currentProp("top_menu_items").includes(testName))
return null;
var args = { name: name, hasIcon: name === "unread" };
var args = { name: text, hasIcon: text === "unread" };
if (opts.category) {
args.category = opts.category;
}