FIX: Deprecation

This commit is contained in:
Robin Ward 2020-07-08 10:25:25 -04:00
parent 097a959d64
commit f751c8fde5
1 changed files with 2 additions and 1 deletions

View File

@ -1,11 +1,12 @@
import { withPluginApi } from "discourse/lib/plugin-api";
import { iconHTML } from "discourse-common/lib/icon-library";
import { later, cancel } from "@ember/runloop";
import getURL from "discourse-common/lib/get-url";
function applyFlairOnMention(element, username) {
if (!element) return;
const href = `${Discourse.BaseUri}/u/${username.toLowerCase()}`;
const href = getURL(`/u/${username.toLowerCase()}`);
const mentions = element.querySelectorAll(`a.mention[href="${href}"]`);
mentions.forEach(mention => {