From 774bc0489ac142f1dc17d5f9dbd43b988fa7989d Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 17 May 2023 07:40:10 -0400 Subject: [PATCH] DRY out --- packages/kit/src/core/postbuild/crawl.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/kit/src/core/postbuild/crawl.js b/packages/kit/src/core/postbuild/crawl.js index 7d264b3cac93..caffef583c55 100644 --- a/packages/kit/src/core/postbuild/crawl.js +++ b/packages/kit/src/core/postbuild/crawl.js @@ -227,11 +227,9 @@ export function crawl(html, base) { } if (tag === 'META' && content) { - if (name && CRAWLABLE_META_NAME_ATTRS.has(name)) { - hrefs.push(resolve(base, content)); - } + const attr = name ?? property; - if (property && CRAWLABLE_META_NAME_ATTRS.has(property)) { + if (attr && CRAWLABLE_META_NAME_ATTRS.has(attr)) { hrefs.push(resolve(base, content)); } }