From c6829edd85f6f36214860c202b6d686c0959079a Mon Sep 17 00:00:00 2001 From: Wadim Kalmykov <36057469+w-4@users.noreply.github.com> Date: Mon, 5 Oct 2020 22:52:11 +0700 Subject: [PATCH] fix tagLabel links (#96) --- extensions/tags/js/src/common/helpers/tagLabel.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/tags/js/src/common/helpers/tagLabel.js b/extensions/tags/js/src/common/helpers/tagLabel.js index b62b6914a..d3a82b39c 100644 --- a/extensions/tags/js/src/common/helpers/tagLabel.js +++ b/extensions/tags/js/src/common/helpers/tagLabel.js @@ -1,4 +1,5 @@ import extract from 'flarum/utils/extract'; +import Link from 'flarum/components/Link'; import tagIcon from './tagIcon'; export default function tagLabel(tag, attrs = {}) { @@ -17,14 +18,14 @@ export default function tagLabel(tag, attrs = {}) { if (link) { attrs.title = tag.description() || ''; - attrs.route = app.route('tag', {tags: tag.slug()}); + attrs.href = app.route('tag', {tags: tag.slug()}); } } else { attrs.className += ' untagged'; } return ( - m((link ? 'a' : 'span'), attrs, + m((link ? Link : 'span'), attrs, {tag && tag.icon() && tagIcon(tag, {}, {useColor: false})} {tagText}