Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #37 from a-stewart/bug-fix-in-browser-call-set-pseudo
Browse files Browse the repository at this point in the history
Add null check for options.locale before calling toLowerCase
  • Loading branch information
dbaeumer authored Nov 8, 2021
2 parents 972081a + e3f36f5 commit 37d9377
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/browser/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function loadMessageBundle(_file?: string) {
}

export function config(options?: Options) {
setPseudo(options?.locale.toLowerCase() === 'pseudo');
setPseudo(options?.locale?.toLowerCase() === 'pseudo');
return loadMessageBundle;
}

Expand Down

0 comments on commit 37d9377

Please sign in to comment.