Skip to content

Commit 4053cb7

Browse files
clean up get identity
1 parent 1c4167c commit 4053cb7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/sdkBase.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,7 @@ export abstract class SdkBase {
163163

164164
public getIdentity(): Identity | null {
165165
const identity = this._identity ?? this.getIdentityNoInit();
166-
if (!isValidIdentity(identity) || this.temporarilyUnavailable(identity)) {
167-
return null;
168-
}
169-
return identity;
166+
return isValidIdentity(identity) && !this.temporarilyUnavailable(identity) ? identity : null;
170167
}
171168

172169
// When the SDK has been initialized, this function should return the token

0 commit comments

Comments
 (0)