From 0a1febacb35bfffe9fdb11c4a37a1ceba7283dc0 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 18 Dec 2013 10:28:57 -0500 Subject: [PATCH] Fix traceback loading the app with all streams muted. (imported from commit 42190bdbba3d56e79d1d9e19b85d6bba0d0d747f) --- static/js/zulip.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/zulip.js b/static/js/zulip.js index a578c6bf9e..2a041b573c 100644 --- a/static/js/zulip.js +++ b/static/js/zulip.js @@ -1329,7 +1329,7 @@ function main() { // // We fall back to the closest selected id, as the user may have removed // a stream from the home before already - if (home_msg_list.selected_id() === -1) { + if (home_msg_list.selected_id() === -1 && !home_msg_list.empty()) { home_msg_list.select_id(page_params.initial_pointer, {then_scroll: true, use_closest: true}); }