From 826685f0eeeb15439b318219e641cb4607f02255 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 27 Apr 2021 23:25:48 -0700 Subject: [PATCH] message_list: Fix misported blueslip.fatal call. In fe66aef0adf7b051ece5e41c047c3eba1aa4196d, this call to blueslip.fatal was ported incorrectly to `throw new Error` despite the latter not supporting the extra_data parameter. We address this by just doing blueslip logging with the extra data first. Fixes #18273. --- static/js/message_list.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/js/message_list.js b/static/js/message_list.js index bf1fc71bc3..f1f2c1a34a 100644 --- a/static/js/message_list.js +++ b/static/js/message_list.js @@ -191,7 +191,8 @@ export class MessageList { id, items_length: this.data.num_items(), }; - throw new Error("Cannot select id -1", error_data); + blueslip.error("Cannot select id -1", error_data); + throw new Error("Cannot select id -1"); } id = closest_id;