DEV: Removed needless indirection

An artifact of when tagging was a plugin no doubt.
This commit is contained in:
Daniel Waterworth 2019-11-11 17:59:19 +00:00
parent e79cec9fc7
commit 4ddb69e9c6
2 changed files with 3 additions and 11 deletions

View File

@ -8,21 +8,10 @@ import {
import BulkTopicSelection from "discourse/mixins/bulk-topic-selection";
import {
default as NavItem,
extraNavItemProperties,
customNavItemHref
} from "discourse/models/nav-item";
import Category from "discourse/models/category";
if (extraNavItemProperties) {
extraNavItemProperties(function(text, opts) {
if (opts && opts.tagId) {
return { tagId: opts.tagId };
} else {
return {};
}
});
}
if (customNavItemHref) {
customNavItemHref(function(navItem) {
if (navItem.get("tagId")) {

View File

@ -122,6 +122,9 @@ NavItem.reopenClass({
if (opts.category) {
args.category = opts.category;
}
if (opts.tagId) {
args.tagId = opts.tagId;
}
if (opts.persistedQueryParams) {
args.persistedQueryParams = opts.persistedQueryParams;
}