Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

changed pageTitle -> titleTag

Steven Tey87240af3ddd9
diff --git a/pages/api/edge/metatags.ts b/pages/api/edge/metatags.ts
index 064d7b79f0..00d314ea91 100644
--- a/pages/api/edge/metatags.ts
+++ b/pages/api/edge/metatags.ts
@@ -88,7 +88,7 @@ const getRelativeUrl = (url: string, imageUrl: string) => {
export const getMetaTags = async (url: string, ev: NextFetchEvent) => {
const html = await getHtml(url);
- const { metaTags, title: pageTitle, linkTags } = getHeadChildNodes(html);
+ const { metaTags, title: titleTag, linkTags } = getHeadChildNodes(html);
let object = {};
@@ -104,7 +104,7 @@ export const getMetaTags = async (url: string, ev: NextFetchEvent) => {
rel && (object[rel] = href);
}
- const title = object["og:title"] || object["twitter:title"] || pageTitle;
+ const title = object["og:title"] || object["twitter:title"] || titleTag;
const description =
object["description"] ||