Skip to content

Commit

Permalink
Fix ResultError toString
Browse files Browse the repository at this point in the history
  • Loading branch information
bkiac committed Nov 4, 2023
1 parent 8b441b3 commit fb27735
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/error/result_error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export abstract class ResultError implements Error {
}

toString() {
return `${this.name}: ${this.message}`
return `${this.name}${this.message ? `: ${this.message}` : ""}`
}

[inspectSymbol]() {
Expand Down

0 comments on commit fb27735

Please sign in to comment.