WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 7072724

Browse files
authored
Use US spelling: USER_CANCELLED -> USER_CANCELED (#11)
Spelling
1 parent f9d7e13 commit 7072724

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ export function Checkout() {
101101
// Challenge was successful
102102
} catch (e) {
103103
if (e instanceof ChallengeError) {
104-
console.error(e);
105-
if (e.code === "USER_CANCELLED") {
104+
if (e.code === "USER_CANCELED") {
106105
// User cancelled the challenge
107106
} else if (e.code === "TOKEN_EXPIRED") {
108107
// Token expired

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@authsignal/react",
3-
"version": "0.0.11",
3+
"version": "0.0.12",
44
"description": "",
55
"keywords": [
66
"authsignal",

src/use-authsignal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class EventEmitter<T> {
2525
}
2626

2727
type ChallengeErrorCodes =
28-
| "USER_CANCELLED"
28+
| "USER_CANCELED"
2929
| "TOKEN_EXPIRED"
3030
| "EXISTING_CHALLENGE";
3131

@@ -131,8 +131,8 @@ export function useAuthsignal() {
131131
setTimeout(() => {
132132
reject(
133133
new ChallengeError(
134-
"USER_CANCELLED",
135-
"Challenge was cancelled by the user.",
134+
"USER_CANCELED",
135+
"Challenge was canceled by the user.",
136136
),
137137
);
138138

0 commit comments

Comments
 (0)