mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix: finalUrl defaults to the url of the page saved
This commit is contained in:
parent
5a50986e6d
commit
1411cf074e
1 changed files with 2 additions and 5 deletions
|
|
@ -154,7 +154,6 @@ export const fetchContent = async (
|
|||
|
||||
let context: BrowserContext | undefined,
|
||||
page: Page | undefined,
|
||||
finalUrl = '',
|
||||
title = '',
|
||||
content: string | undefined,
|
||||
contentType: string | undefined,
|
||||
|
|
@ -201,13 +200,11 @@ export const fetchContent = async (
|
|||
page = result.page
|
||||
}
|
||||
if (result && result.finalUrl) {
|
||||
finalUrl = result.finalUrl
|
||||
url = result.finalUrl
|
||||
}
|
||||
if (result && result.contentType) {
|
||||
contentType = result.contentType
|
||||
}
|
||||
} else {
|
||||
finalUrl = url
|
||||
}
|
||||
|
||||
if (contentType !== 'application/pdf') {
|
||||
|
|
@ -260,7 +257,7 @@ export const fetchContent = async (
|
|||
console.info(`content-fetch result`, logRecord)
|
||||
}
|
||||
|
||||
return { finalUrl, title, content, readabilityResult, contentType }
|
||||
return { finalUrl: url, title, content, readabilityResult, contentType }
|
||||
}
|
||||
|
||||
function validateUrlString(url: string) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue