Skip to content

Commit 7f89e17

Browse files
Update IdentifierView.js
1 parent dc008b9 commit 7f89e17

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
@@ -312,18 +312,19 @@ export default BaseView.extend({
312312
},
313313

314314
getCredentialsAndSave() {
315-
// AbortController is not supported in IE11
316-
if (typeof AbortController !== 'undefined') {
317-
this.webauthnAbortController = new AbortController();
318-
}
319-
320315
const allowCredentials = [];
321316
const challengeData = this.options.appState.get('webauthnChallenge')?.challengeData;
317+
if (!challengeData) return;
322318
const options = _.extend({}, challengeData, {
323319
allowCredentials,
324320
challenge: CryptoUtil.strToBin(challengeData.challenge),
325321
});
326322

323+
// AbortController is not supported in IE11
324+
if (typeof AbortController !== 'undefined') {
325+
this.webauthnAbortController = new AbortController();
326+
}
327+
327328
// navigator.credentials() is not supported in IE11
328329
// eslint-disable-next-line compat/compat
329330
navigator.credentials.get({

0 commit comments

Comments
 (0)