Skip to content

Commit

Permalink
[translated-error-bugs] small tweak for code clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
handeyeco committed Jan 27, 2025
1 parent c927140 commit 98435b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/perseus/src/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1001,11 +1001,11 @@ export function mapErrorToString(
// the string representing an error code
err: string | null | undefined,
// the translated Perseus strings
strings: PerseusStrings,
translatedStrings: PerseusStrings,
) {
if (!err) {
return err;
}

return strings[errorToString[err]] || err;
return translatedStrings[errorToString[err]] || err;
}

0 comments on commit 98435b3

Please sign in to comment.