From 6acbcec39dbbf0e3f555c8e8dc7c3d7e465d52cd Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 22 Dec 2020 02:23:33 -0800 Subject: [PATCH] eslint: Fix unicorn/error-message. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v24.0.0/docs/rules/error-message.md Signed-off-by: Anders Kaseorg --- static/js/blueslip.js | 2 +- static/js/blueslip_stacktrace.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/blueslip.js b/static/js/blueslip.js index 62d8189ea2..48c26e75f5 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 049d7dad82..b28cc01be6 100644 --- a/static/js/blueslip_stacktrace.ts +++ b/static/js/blueslip_stacktrace.ts @@ -82,7 +82,7 @@ async function get_context(location: StackFrame): Promise { - const ex = new Error(); + const ex = new Error("dummy"); ex.stack = stack; const stackframes: CleanStackFrame[] = await Promise.all(