mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
Improve error message in message_list.select_id().
This commit is contained in:
@@ -157,10 +157,15 @@ exports.MessageList.prototype = {
|
||||
previously_selected: this._selected_id,
|
||||
});
|
||||
|
||||
id = parseFloat(id);
|
||||
function convert_id(str_id) {
|
||||
var id = parseFloat(str_id);
|
||||
if (isNaN(id)) {
|
||||
blueslip.fatal("Bad message id");
|
||||
blueslip.fatal("Bad message id " + str_id);
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
id = convert_id(id);
|
||||
|
||||
var closest_id = this.closest_id(id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user