1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-12-02 20:22:52 +00:00

small fix for error display

This commit is contained in:
Laura
2025-10-03 01:27:52 +02:00
parent 6ef49cc3e8
commit ef2af41c9c

View File

@@ -884,6 +884,14 @@
} }
setError(error) { setError(error) {
if (typeof error === "object") {
if ("Message" in error) {
error = error.Message;
} else {
error = JSON.stringify(error);
}
}
this.#error = error || "Something went wrong"; this.#error = error || "Something went wrong";
this.#_message.classList.add("errored", "has-text"); this.#_message.classList.add("errored", "has-text");