Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changes to how same as functions are implemented in user object
Browse files Browse the repository at this point in the history
rishabhpoddar committed Sep 25, 2024
1 parent e57cda4 commit 3915e95
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/build/user.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions lib/ts/user.ts
Original file line number Diff line number Diff line change
@@ -29,6 +29,9 @@ export class LoginMethod implements RecipeLevelUser {
}

hasSameEmailAs(email: string | undefined): boolean {
if (this.email === undefined && email === undefined) {
return true;
}
if (email === undefined) {
return false;
}
@@ -38,6 +41,9 @@ export class LoginMethod implements RecipeLevelUser {
}

hasSamePhoneNumberAs(phoneNumber: string | undefined): boolean {
if (this.phoneNumber === undefined && phoneNumber === undefined) {
return true;
}
if (phoneNumber === undefined) {
return false;
}
@@ -53,6 +59,9 @@ export class LoginMethod implements RecipeLevelUser {
}

hasSameThirdPartyInfoAs(thirdParty?: { id: string; userId: string }): boolean {
if (this.thirdParty === undefined && thirdParty === undefined) {
return true;
}
if (thirdParty === undefined) {
return false;
}

0 comments on commit 3915e95

Please sign in to comment.