Merge pull request #774 from omnivore-app/fix/missing-title

Fallback to domain to url if no title
This commit is contained in:
Hongbo Wu 2022-06-09 11:48:49 +08:00 committed by GitHub
commit 85317df671
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -258,7 +258,9 @@ export const createArticleResolver = authorized<
title ||
parsedContent?.title ||
preparedDocument?.pageInfo.title ||
croppedPathname,
croppedPathname ||
parsedContent?.siteName ||
url,
author: parsedContent?.byline,
url: normalizeUrl(canonicalUrl || url, {
stripHash: true,