From 57cb98b622cfb6fc80e441d055bce8888aeda4e1 Mon Sep 17 00:00:00 2001 From: Zerebos Date: Tue, 10 Dec 2024 21:22:27 -0500 Subject: [PATCH] Fix stacktrace --- renderer/src/modules/api/logger.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/renderer/src/modules/api/logger.js b/renderer/src/modules/api/logger.js index be4eb15b..2d7c3169 100644 --- a/renderer/src/modules/api/logger.js +++ b/renderer/src/modules/api/logger.js @@ -55,6 +55,11 @@ class Logger { * @param {Error} error - Error object to log with the message. */ stacktrace(pluginName, message, error) { + if (this.#pluginName) { + error = message; + message = pluginName; + pluginName = this.#pluginName; + } console.error(`%c[${pluginName}]%c ${message}\n\n%c`, this.#nameStyle, "color: red; font-weight: 700;", "color: red;", error); }