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}