1
0
mirror of https://github.com/flarum/core.git synced 2025-08-08 09:26:34 +02:00

Prevent crash when rendering deleted tag

This commit is contained in:
Toby Zerner
2015-07-29 09:27:00 +09:30
parent 51558e2b3b
commit 5ba4934105

View File

@@ -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';