[Vuejs]-Computed propert y in vue3 => object is possibly undefined TypeScript,

1👍

you can try:

    const totalNameLength = computed(() => {
            return Number(userFirstnameLenght?.value ?? 0) + Number(userLastnameLenght?.value ?? 0)
      })

👤IZEM

Leave a comment