fix(frontend): 🐛 checkbox value in form is not a boolean

This commit is contained in:
Julien Oculi 2024-06-19 17:31:35 +02:00
parent 22a6ffc4fb
commit 3bf4083a10
2 changed files with 4 additions and 3 deletions

View file

@ -35,7 +35,8 @@
"pwa",
"api",
"ux",
"route"
"route",
"frontend"
],
"[ignore]": {
"editor.defaultFormatter": "foxundermoon.shell-format"

View file

@ -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')
}