diff --git a/zephyr/static/js/zephyr.js b/zephyr/static/js/zephyr.js index cde5cf651a..d738972b89 100644 --- a/zephyr/static/js/zephyr.js +++ b/zephyr/static/js/zephyr.js @@ -591,10 +591,10 @@ function add_messages_helper(messages, msg_list, predicate, messages_are_new) { } // Put messages in correct order on either side of the message list - if (msg_list.empty() || (msg.id < msg_list.first().id)) { - top_messages.push(msg); - } else if (msg.id > msg_list.last().id) { + if (msg_list.empty() || msg.id > msg_list.last().id) { bottom_messages.push(msg); + } else if (msg.id < msg_list.first().id) { + top_messages.push(msg); } else { interior_messages.push(msg); }