Parse message IDs as floats

(imported from commit d9954e4225e95e2931be1d1fe5ecf0b93914b07e)
This commit is contained in:
Leo Franchi 2013-12-18 14:09:09 -05:00
parent f0e3afe0d3
commit 80e6dab78a
2 changed files with 4 additions and 4 deletions

View File

@ -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");
}

View File

@ -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 = {