Skip to content

Commit 05e155b

Browse files
committed
Remove unnecessary variable assignment in example code
1 parent 45d5360 commit 05e155b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

README

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,7 @@ function uint8arrayToBase64url(bytes) {
201201
return base64js.fromByteArray(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
202202
}
203203

204-
const credentialCreateJson =
205-
fetch(/* ... */) // Make the call that returns the credentialCreateJson above
204+
fetch(/* ... */) // Make the call that returns the credentialCreateJson above
206205
.then(credentialCreateJson => // Call WebAuthn ceremony
207206
navigator.credentials.create(credentialCreateJson))
208207
.then(publicKeyCredential => ({ // Encode PublicKeyCredential for transport to server (example)
@@ -292,8 +291,7 @@ function uint8arrayToBase64url(bytes) {
292291
return base64js.fromByteArray(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
293292
}
294293

295-
const credentialGetJson =
296-
fetch(/* ... */) // Make the call that returns the credentialGetJson above
294+
fetch(/* ... */) // Make the call that returns the credentialGetJson above
297295
.then(credentialGetJson => // Call WebAuthn ceremony
298296
navigator.credentials.get(credentialGetJson))
299297
.then(publicKeyCredential => ({ // Encode PublicKeyCredential for transport to server (example)

0 commit comments

Comments
 (0)