Skip to content

Commit 715c925

Browse files
committed
fix(sdk-coin-near): account id is undefined
TICKET: WIN-6025
1 parent 48e7fa0 commit 715c925

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/sdk-coin-near/src/lib/utils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ export class Utils implements BaseUtils {
4949
* or can create a new keyPair
5050
*/
5151
isValidAccountId(accountId: string): boolean {
52+
if (!accountId) {
53+
return false;
54+
}
5255
return (
5356
(/^(([a-z\d]+[\-_])*[a-z\d]+\.)*([a-z\d]+[\-_])*[a-z\d]+$/.test(accountId) &&
5457
accountId.length >= 2 &&

0 commit comments

Comments
 (0)