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",
|
||||
"api",
|
||||
"ux",
|
||||
"route"
|
||||
"route",
|
||||
"frontend"
|
||||
],
|
||||
"[ignore]": {
|
||||
"editor.defaultFormatter": "foxundermoon.shell-format"
|
||||
|
|
|
@ -35,7 +35,7 @@ export default function LoginForm() {
|
|||
|
||||
type LoginFormFields = {
|
||||
email: string
|
||||
passkey: boolean
|
||||
passkey: 'on' | undefined
|
||||
}
|
||||
|
||||
async function connect(event: Event) {
|
||||
|
@ -46,7 +46,7 @@ async function connect(event: Event) {
|
|||
|
||||
try {
|
||||
// User disable passkey
|
||||
if (!fields.passkey) {
|
||||
if (fields.passkey !== 'on') {
|
||||
throw new Error('User refused passkey')
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue