FIX: Deprecations

This commit is contained in:
Robin Ward 2020-07-07 11:32:20 -04:00
parent 28a98b4ac0
commit 4a023f0c93
1 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@
const { iconHTML, iconNode } = require("discourse-common/lib/icon-library"); const { iconHTML, iconNode } = require("discourse-common/lib/icon-library");
const { isRTL } = require("discourse/lib/text-direction"); const { isRTL } = require("discourse/lib/text-direction");
const { h } = require("virtual-dom"); const { h } = require("virtual-dom");
const getURL = require('discourse-common/lib/get-url').default;
var get = Em.get, var get = Em.get,
escapeExpression = Handlebars.Utils.escapeExpression; escapeExpression = Handlebars.Utils.escapeExpression;
@ -36,7 +37,7 @@
let restricted = get(category, "read_restricted"); let restricted = get(category, "read_restricted");
let url = opts.url let url = opts.url
? opts.url ? opts.url
: Discourse.getURL("/c/") + Category.slugFor(category); : getURL("/c/") + Category.slugFor(category);
let href = opts.link === false ? "" : url; let href = opts.link === false ? "" : url;
let tagName = opts.link === false || opts.link === "false" ? "span" : "a"; let tagName = opts.link === false || opts.link === "false" ? "span" : "a";
let extraClasses = opts.extraClasses ? " " + opts.extraClasses : ""; let extraClasses = opts.extraClasses ? " " + opts.extraClasses : "";