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:
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user