mirror of
https://github.com/flarum/core.git
synced 2025-08-16 13:24:11 +02:00
Merge pull request #24 from cmaas/master
Includes primary tag when starting a discussion under secondary tag.
This commit is contained in:
@@ -10,7 +10,12 @@ export default function() {
|
|||||||
const tag = app.store.getBy('tags', 'slug', this.params().tags);
|
const tag = app.store.getBy('tags', 'slug', this.params().tags);
|
||||||
|
|
||||||
if (tag) {
|
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