Skip to content

Commit d160c35

Browse files
Update IdentifierView.js
1 parent d20d08b commit d160c35

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/v2/view-builder/views/IdentifierView.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,18 +309,19 @@ export default BaseView.extend({
309309
},
310310

311311
getCredentialsAndSave() {
312-
// AbortController is not supported in IE11
313-
if (typeof AbortController !== 'undefined') {
314-
this.webauthnAbortController = new AbortController();
315-
}
316-
317312
const allowCredentials = [];
318313
const challengeData = this.options.appState.get('webauthnChallenge')?.challengeData;
314+
if (!challengeData) return;
319315
const options = _.extend({}, challengeData, {
320316
allowCredentials,
321317
challenge: CryptoUtil.strToBin(challengeData.challenge),
322318
});
323319

320+
// AbortController is not supported in IE11
321+
if (typeof AbortController !== 'undefined') {
322+
this.webauthnAbortController = new AbortController();
323+
}
324+
324325
// navigator.credentials() is not supported in IE11
325326
// eslint-disable-next-line compat/compat
326327
navigator.credentials.get({

0 commit comments

Comments
 (0)