fix(stage-ui,stage-pages): many type errors
This commit is contained in:
@@ -77,7 +77,7 @@ function removeKeyValue(index: number, headers: { key: string, value: string }[]
|
||||
}
|
||||
|
||||
watch(headers, (headers) => {
|
||||
if (headers.length > 0 && (headers.at(-1).key !== '' || headers.at(-1).value !== '')) {
|
||||
if (headers.length > 0 && (headers.at(-1)!.key !== '' || headers.at(-1)!.value !== '')) {
|
||||
headers.push({ key: '', value: '' })
|
||||
}
|
||||
if (!providers.value[providerId])
|
||||
|
||||
@@ -160,7 +160,7 @@ function normalizeHeaderRows(headers: Record<string, string>) {
|
||||
if (rows.length === 0) {
|
||||
rows.push({ key: '', value: '' })
|
||||
}
|
||||
else if (rows.at(-1).key !== '' || rows.at(-1).value !== '') {
|
||||
else if (rows.at(-1)!.key !== '' || rows.at(-1)!.value !== '') {
|
||||
rows.push({ key: '', value: '' })
|
||||
}
|
||||
return rows
|
||||
|
||||
@@ -35,7 +35,7 @@ function removeKeyValue(index: number, headers: { key: string, value: string }[]
|
||||
}
|
||||
|
||||
watch(emptyHeaders, (headers) => {
|
||||
if (headers.length > 0 && (headers.at(-1).key !== '' || headers.at(-1).value !== '')) {
|
||||
if (headers.length > 0 && (headers.at(-1)!.key !== '' || headers.at(-1)!.value !== '')) {
|
||||
emptyHeaders.value.push({ key: '', value: '' })
|
||||
}
|
||||
}, {
|
||||
@@ -44,7 +44,7 @@ watch(emptyHeaders, (headers) => {
|
||||
})
|
||||
|
||||
watch(singleHeader, (headers) => {
|
||||
if (headers.length > 0 && (headers.at(-1).key !== '' || headers.at(-1).value !== '')) {
|
||||
if (headers.length > 0 && (headers.at(-1)!.key !== '' || headers.at(-1)!.value !== '')) {
|
||||
singleHeader.value.push({ key: '', value: '' })
|
||||
}
|
||||
}, {
|
||||
@@ -53,7 +53,7 @@ watch(singleHeader, (headers) => {
|
||||
})
|
||||
|
||||
watch(multipleHeaders, (headers) => {
|
||||
if (headers.length > 0 && (headers.at(-1).key !== '' || headers.at(-1).value !== '')) {
|
||||
if (headers.length > 0 && (headers.at(-1)!.key !== '' || headers.at(-1)!.value !== '')) {
|
||||
multipleHeaders.value.push({ key: '', value: '' })
|
||||
}
|
||||
}, {
|
||||
|
||||
Reference in New Issue
Block a user