You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Explicitly Initialize Input Refs with null for Better Type Safety (#31)
### Summary
This PR updates the initialization of `ref<HTMLInputElement>` references by explicitly setting them to `null`.
### Changes
- Updated `ref<HTMLInputElement>()` to `ref<HTMLInputElement | null>(null)`, ensuring proper type safety.
- Prevents potential runtime errors by making sure `passwordInput.value` and `currentPasswordInput.value` are never `undefined`.
- Aligns with Vue best practices for handling template refs.
### Why?
- Without explicit `null`, TypeScript infers `undefined`, leading to potential issues when accessing `.value`.
- Ensures better predictability and avoids unnecessary runtime checks.
This change improves overall code reliability and maintainability.
0 commit comments