fix(frontend): 🐛 checkbox value in form is not a boolean
This commit is contained in:
parent
22a6ffc4fb
commit
3bf4083a10
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
@ -35,7 +35,8 @@
|
||||||
"pwa",
|
"pwa",
|
||||||
"api",
|
"api",
|
||||||
"ux",
|
"ux",
|
||||||
"route"
|
"route",
|
||||||
|
"frontend"
|
||||||
],
|
],
|
||||||
"[ignore]": {
|
"[ignore]": {
|
||||||
"editor.defaultFormatter": "foxundermoon.shell-format"
|
"editor.defaultFormatter": "foxundermoon.shell-format"
|
||||||
|
|
|
@ -35,7 +35,7 @@ export default function LoginForm() {
|
||||||
|
|
||||||
type LoginFormFields = {
|
type LoginFormFields = {
|
||||||
email: string
|
email: string
|
||||||
passkey: boolean
|
passkey: 'on' | undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
async function connect(event: Event) {
|
async function connect(event: Event) {
|
||||||
|
@ -46,7 +46,7 @@ async function connect(event: Event) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// User disable passkey
|
// User disable passkey
|
||||||
if (!fields.passkey) {
|
if (fields.passkey !== 'on') {
|
||||||
throw new Error('User refused passkey')
|
throw new Error('User refused passkey')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue