Merge pull request #24 from cmaas/master

Includes primary tag when starting a discussion under secondary tag.
This commit is contained in:
Franz Liedke 2015-12-11 21:14:35 +01:00
commit 1ff5d94324

View File

@ -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);
} }
}); });