Skip to content

Commit

Permalink
use null coalescence ops
Browse files Browse the repository at this point in the history
  • Loading branch information
BolajiOlajide committed Sep 4, 2024
1 parent 4c4d05e commit 00bbc20
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ class NgFaker {
constructor(opts: NgFakerOpts) {
try {
ngFakerOptsSchema.parse(opts);
if (!opts.locale) {
opts.locale = Locale.ENGLISH;
}
this.locale = opts.locale;
this.locale = opts.locale ?? Locale.ENGLISH;

this.random = new Random();
this.account = new Account(this.random);
Expand Down

0 comments on commit 00bbc20

Please sign in to comment.