Skip to content

Commit 507eaa0

Browse files
committed
Use nullish coalescing assignment
1 parent b94d40f commit 507eaa0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/modules/ClientApi.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ export class ClientApi implements IClientApi {
1919
}
2020

2121
public get accountData(): AccountDataApi {
22-
if (!this.accountDataApi) {
23-
this.accountDataApi = new AccountDataApi();
24-
}
22+
this.accountDataApi ??= new AccountDataApi();
2523
return this.accountDataApi;
2624
}
2725
}

0 commit comments

Comments
 (0)