diff --git a/static/js/message_list.js b/static/js/message_list.js index df251bddca..c8955267c0 100644 --- a/static/js/message_list.js +++ b/static/js/message_list.js @@ -86,7 +86,7 @@ MessageList.prototype = { }, get: function MessageList_get(id) { - id = parseInt(id, 10); + id = parseFloat(id); if (isNaN(id)) { return undefined; } @@ -150,7 +150,7 @@ MessageList.prototype = { previously_selected: this._selected_id }); - id = parseInt(id, 10); + id = parseFloat(id); if (isNaN(id)) { blueslip.fatal("Bad message id"); } @@ -262,7 +262,7 @@ MessageList.prototype = { _add_to_hash: function MessageList__add_to_hash(messages) { var self = this; messages.forEach(function (elem) { - var id = parseInt(elem.id, 10); + var id = parseFloat(elem.id); if (isNaN(id)) { blueslip.fatal("Bad message id"); } diff --git a/static/js/rows.js b/static/js/rows.js index 86165f9061..845d000d35 100644 --- a/static/js/rows.js +++ b/static/js/rows.js @@ -36,7 +36,7 @@ exports.last_visible = function () { }; exports.id = function (message_row) { - return parseInt(message_row.attr('zid'), 10); + return parseFloat(message_row.attr('zid'), 10); }; var valid_table_names = {