From 1edcbfb8b0e08f838c2664e7c477f1ee3e641cf7 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 16 Jan 2014 18:18:21 -0500 Subject: [PATCH] Fix tab bar for embedded topic narrows. (imported from commit 4c63478b1899c22f3d0be5651e2eb82aecdaaa4a) --- static/js/tab_bar.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/static/js/tab_bar.js b/static/js/tab_bar.js index 381d39b46a..0e25e874ff 100644 --- a/static/js/tab_bar.js +++ b/static/js/tab_bar.js @@ -22,8 +22,13 @@ function make_tab_data() { tabs.push(make_tab("All Messages", "#narrow/in/all", undefined, "root")); } else if (page_params.narrow !== undefined) { tabs.push(make_tab("Stream " + page_params.narrow_stream, - hashchange.operators_to_hash(page_params.narrow[0]), + hashchange.operators_to_hash([page_params.narrow[0]]), page_params.narrow_stream, 'stream')); + if (page_params.narrow_topic !== undefined) { + tabs.push(make_tab("Topic " + page_params.narrow_topic, + hashchange.operators_to_hash(page_params.narrow), + null)); + } } else { tabs.push(make_tab("Home", "#", "home", "root")); }