Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

blueslip: Fix implicit use of any.

Anders Kaseorg7651a0056674
diff --git a/web/src/blueslip.ts b/web/src/blueslip.ts
index 7a79a3e1af7..b965ce74d5c 100644
--- a/web/src/blueslip.ts
+++ b/web/src/blueslip.ts
@@ -112,15 +112,8 @@ export function error(msg: string, more_info?: object | undefined, original_erro
if (page_params.development_environment) {
$(window).on("error", (event: JQuery.TriggeredEvent) => {
const {originalEvent} = event;
- if (!(originalEvent instanceof ErrorEvent)) {
- return;
+ if (originalEvent instanceof ErrorEvent && originalEvent.error instanceof Error) {
+ void display_stacktrace(originalEvent.error);
}
-
- const ex = originalEvent.error;
- if (!ex) {
- return;
- }
-
- void display_stacktrace(ex);
});
}