Skip to content

A platform for community discussion. Free, open, simple.

UX: direct to single tag page from tag intersection when one tag remains (#34038)

Kris6f489d530383
diff --git a/app/assets/javascripts/select-kit/addon/components/tags-intersection-chooser.js b/app/assets/javascripts/select-kit/addon/components/tags-intersection-chooser.js
index 74147687375..4dd3132ab06 100644
--- a/app/assets/javascripts/select-kit/addon/components/tags-intersection-chooser.js
+++ b/app/assets/javascripts/select-kit/addon/components/tags-intersection-chooser.js
@@ -31,11 +31,13 @@ export default class TagsIntersectionChooser extends MiniTagChooser {
`/tags/intersection/${this.mainTag}/${remainingTags.join("/")}`
);
} else {
- DiscourseURL.routeTo("/tags");
+ DiscourseURL.routeTo(`/tag/${this.mainTag}`);
}
} else {
if (tags.length >= 2) {
DiscourseURL.routeTo(`/tags/intersection/${tags.join("/")}`);
+ } else if (tags.length === 1) {
+ DiscourseURL.routeTo(`/tag/${tags[0]}`);
} else {
DiscourseURL.routeTo("/tags");
}