Skip to content

Commit

Permalink
chore(expo): Add optional operator to passkeysFunc
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexNti committed Oct 17, 2024
1 parent ba601f5 commit 84a6da3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/expo/src/provider/singleton/createClerkInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ export function createClerkInstance(ClerkClass: typeof Clerk) {
__internal_clerk.__unstable__createPublicCredentials = (
publicKeyCredential: PublicKeyCredentialCreationOptionsWithoutExtensions,
) => {
return options?.passkeysFunc.create(publicKeyCredential);
return options?.passkeysFunc?.create(publicKeyCredential);
};

// @ts-expect-error - This is an internal API
__internal_clerk.__unstable__getPublicCredentials = (
publicKeyCredential: PublicKeyCredentialRequestOptionsWithoutExtensions,
) => {
return options?.passkeysFunc.get(publicKeyCredential);
return options?.passkeysFunc?.get(publicKeyCredential);
};
// @ts-expect-error - This is an internal API
__internal_clerk.__unstable__isWebAuthnSupported = () => {
return options?.passkeysFunc.isSupported();
return options?.passkeysFunc?.isSupported();
};
}

Expand Down

0 comments on commit 84a6da3

Please sign in to comment.