fix: do not throw error if title is undefined in cache

This commit is contained in:
Hongbo Wu
2024-01-23 19:19:46 +08:00
parent 25603cf136
commit 5495ad782e

View File

@ -58,16 +58,6 @@ interface CreateArticleResponse {
}
}
interface SavePageResponse {
data: {
savePage: {
url: string
clientRequestId: string
errorCodes?: string[]
}
}
}
interface FetchResult {
finalUrl: string
title?: string
@ -77,12 +67,7 @@ interface FetchResult {
}
const isFetchResult = (obj: unknown): obj is FetchResult => {
return (
typeof obj === 'object' &&
obj !== null &&
'finalUrl' in obj &&
'title' in obj
)
return typeof obj === 'object' && obj !== null && 'finalUrl' in obj
}
const uploadToSignedUrl = async (