summaryrefslogtreecommitdiffhomepage
path: root/packages/browser/src/helpers/webAuthnAbortService.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2023-03-15 22:53:17 -0700
committerGitHub <noreply@github.com>2023-03-15 22:53:17 -0700
commit57c9b79a65d62af80c57204536967f99f5951cd4 (patch)
tree88669cbb8fbeefddea12933742a06c9df8d60943 /packages/browser/src/helpers/webAuthnAbortService.ts
parentcc6b4e83d0c8087f78c1851a5b0f60a1d7223ec6 (diff)
parent766603df24c54f740b6164ce298c31f8dc75715f (diff)
Merge pull request #371 from MasterKale/fix/359-error-from-conditional-ui-abort
fix/359-error-from-conditional-ui-abort
Diffstat (limited to 'packages/browser/src/helpers/webAuthnAbortService.ts')
-rw-r--r--packages/browser/src/helpers/webAuthnAbortService.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/browser/src/helpers/webAuthnAbortService.ts b/packages/browser/src/helpers/webAuthnAbortService.ts
index 8955526..f90b263 100644
--- a/packages/browser/src/helpers/webAuthnAbortService.ts
+++ b/packages/browser/src/helpers/webAuthnAbortService.ts
@@ -12,7 +12,9 @@ class WebAuthnAbortService {
createNewAbortSignal() {
// Abort any existing calls to navigator.credentials.create() or navigator.credentials.get()
if (this.controller) {
- this.controller.abort('Cancelling existing WebAuthn API call for new one');
+ const abortError = new Error('Cancelling existing WebAuthn API call for new one');
+ abortError.name = 'AbortError';
+ this.controller.abort(abortError);
}
const newController = new AbortController();