Skip to content

Commit

Permalink
fixed mistakenly stringified strings
Browse files Browse the repository at this point in the history
UmamiAppearance committed Jan 11, 2023

Verified

This commit was signed with the committer’s verified signature.
1 parent 3f0cc21 commit 3fe6ed4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/errors.js
Original file line number Diff line number Diff line change
@@ -15,7 +15,10 @@ class MatchError extends Error {
*/
class DebuggingError extends Error {
constructor(message) {
super(JSON.stringify(message, null, 4));
if (typeof message !== "string") {
message = JSON.stringify(message, null, 4);
}
super(message);
this.name = "DebuggingError";
}
}

0 comments on commit 3fe6ed4

Please sign in to comment.