mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 03:59:39 +08:00
Prevent crash when rendering deleted tag
This commit is contained in:
parent
51558e2b3b
commit
5ba4934105
@ -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';
|
||||
|
Loading…
x
Reference in New Issue
Block a user