diff --git a/static/js/narrow.js b/static/js/narrow.js index ae92a86c3a..8d1ef4aafa 100644 --- a/static/js/narrow.js +++ b/static/js/narrow.js @@ -187,9 +187,13 @@ exports.activate = function (raw_operators, opts) { // Populate the message list if we can apply our filter locally (i.e. // with no backend help) and we have the message we want to select. if (narrow_state.get_current_filter().can_apply_locally()) { - if (message_list.all.get(then_select_id) !== undefined) { - message_util.add_messages(message_list.all.all_messages(), message_list.narrowed, - {delay_render: true}); + if (then_select_id !== -1) { + if (message_list.all.get(then_select_id) !== undefined) { + message_util.add_messages( + message_list.all.all_messages(), + message_list.narrowed, + {delay_render: true}); + } } }