From 5ba4934105497c04161daa4825a06d960adc530d Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Wed, 29 Jul 2015 09:27:00 +0930 Subject: [PATCH] Prevent crash when rendering deleted tag --- extensions/tags/js/forum/src/helpers/tagLabel.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/extensions/tags/js/forum/src/helpers/tagLabel.js b/extensions/tags/js/forum/src/helpers/tagLabel.js index 359bf0fde..ebdd5679c 100644 --- a/extensions/tags/js/forum/src/helpers/tagLabel.js +++ b/extensions/tags/js/forum/src/helpers/tagLabel.js @@ -5,10 +5,6 @@ export default function tagLabel(tag, attrs = {}) { attrs.className = 'TagLabel ' + (attrs.className || ''); const link = extract(attrs, 'link'); - if (link) { - attrs.href = app.route('tag', {tags: tag.slug()}); - attrs.config = m.route; - } if (tag) { const color = tag.color(); @@ -19,6 +15,8 @@ export default function tagLabel(tag, attrs = {}) { if (link) { attrs.title = tag.description() || ''; + attrs.href = app.route('tag', {tags: tag.slug()}); + attrs.config = m.route; } } else { attrs.className += ' untagged';