mirror of
https://github.com/flarum/framework.git
synced 2024-12-02 15:03:44 +08:00
Merge pull request #24 from cmaas/master
Includes primary tag when starting a discussion under secondary tag.
This commit is contained in:
commit
1ff5d94324
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user