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.

eslint: Fix unicorn/error-message.

Anders Kaseorg6acbcec39dbb
diff --git a/static/js/blueslip.js b/static/js/blueslip.js
index 62d8189ea2e..48c26e75f55 100644
--- a/static/js/blueslip.js
+++ b/static/js/blueslip.js
@@ -237,7 +237,7 @@ exports.warn = function blueslip_warn(msg, more_info) {
exports.error = function blueslip_error(msg, more_info, stack) {
if (stack === undefined) {
- stack = new Error().stack;
+ stack = new Error("dummy").stack;
}
const args = build_arg_list(msg, more_info);
logger.error(...args);
diff --git a/static/js/blueslip_stacktrace.ts b/static/js/blueslip_stacktrace.ts
index 049d7dad824..b28cc01be6e 100644
--- a/static/js/blueslip_stacktrace.ts
+++ b/static/js/blueslip_stacktrace.ts
@@ -82,7 +82,7 @@ async function get_context(location: StackFrame): Promise<NumberedLine[] | undef
}
export async function display_stacktrace(error: string, stack: string): Promise<void> {
- const ex = new Error();
+ const ex = new Error("dummy");
ex.stack = stack;
const stackframes: CleanStackFrame[] = await Promise.all(