From fb277356faf5bcf306ed71b466e919d084b9a245 Mon Sep 17 00:00:00 2001 From: bkiac Date: Sat, 4 Nov 2023 08:35:47 +0100 Subject: [PATCH] Fix ResultError toString --- src/error/result_error.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/error/result_error.ts b/src/error/result_error.ts index 514d25f..8f3a628 100644 --- a/src/error/result_error.ts +++ b/src/error/result_error.ts @@ -35,7 +35,7 @@ export abstract class ResultError implements Error { } toString() { - return `${this.name}: ${this.message}` + return `${this.name}${this.message ? `: ${this.message}` : ""}` } [inspectSymbol]() {