From 1680b1bfe90f8c374f9910494283fd736fde2900 Mon Sep 17 00:00:00 2001 From: ntaso Date: Fri, 11 Dec 2015 17:55:02 +0100 Subject: [PATCH] Includes primary tag when starting a discussion under secondary tag. Fixes #424. --- extensions/tags/js/forum/src/addTagComposer.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extensions/tags/js/forum/src/addTagComposer.js b/extensions/tags/js/forum/src/addTagComposer.js index 05ae57905..3e5a4767f 100644 --- a/extensions/tags/js/forum/src/addTagComposer.js +++ b/extensions/tags/js/forum/src/addTagComposer.js @@ -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); } });