1
0
mirror of https://github.com/flarum/core.git synced 2025-08-13 20:04:24 +02:00

Includes primary tag when starting a discussion under secondary tag. Fixes #424.

This commit is contained in:
ntaso
2015-12-11 17:55:02 +01:00
parent 1e6ab2c89d
commit 1680b1bfe9

View File

@@ -10,7 +10,12 @@ export default function() {
const tag = app.store.getBy('tags', 'slug', this.params().tags);
if (tag) {
promise.then(component => component.tags = [tag]);
const parent = tag.parent();
let tags = [tag];
if (parent) {
tags.unshift(parent);
}
promise.then(component => component.tags = tags);
}
});