Skip to content

Commit

Permalink
changes to how same as functions are implemented in user object
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhpoddar committed Sep 25, 2024
1 parent e57cda4 commit 3915e95
Show file tree
Hide file tree
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
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 3915e95

Please sign in to comment.