mirror of https://github.com/zulip/zulip.git
Improve error message in message_list.select_id().
This commit is contained in:
parent
6314f60edc
commit
24ee369d43
|
@ -157,11 +157,16 @@ exports.MessageList.prototype = {
|
|||
previously_selected: this._selected_id,
|
||||
});
|
||||
|
||||
id = parseFloat(id);
|
||||
if (isNaN(id)) {
|
||||
blueslip.fatal("Bad message id");
|
||||
function convert_id(str_id) {
|
||||
var id = parseFloat(str_id);
|
||||
if (isNaN(id)) {
|
||||
blueslip.fatal("Bad message id " + str_id);
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
id = convert_id(id);
|
||||
|
||||
var closest_id = this.closest_id(id);
|
||||
|
||||
// The name "use_closest" option is a bit legacy. We
|
||||
|
|
Loading…
Reference in New Issue