[TS] Fix ts-strict errors in Vue components (Part 3) (#3126)

This commit is contained in:
Chenlei Hu
2025-03-18 11:38:43 -04:00
committed by GitHub
parent a85a1bf794
commit 96ff8a7785
18 changed files with 56 additions and 40 deletions

View File

@@ -99,7 +99,7 @@ const isValidSource = computed(
() => sourcePath.value !== '' && pathError.value === ''
)
const validateSource = async (sourcePath: string) => {
const validateSource = async (sourcePath: string | undefined) => {
if (!sourcePath) {
pathError.value = ''
return
@@ -109,7 +109,7 @@ const validateSource = async (sourcePath: string) => {
pathError.value = ''
const validation = await electron.validateComfyUISource(sourcePath)
if (!validation.isValid) pathError.value = validation.error
if (!validation.isValid) pathError.value = validation.error ?? 'ERROR'
} catch (error) {
console.error(error)
pathError.value = t('install.pathValidationFailed')