fix: only check for duplicate meta tags

pull/977/head
Divyansh Singh 3 years ago committed by GitHub
parent f7e9cfeb3a
commit 3f4a3640c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -144,6 +144,7 @@ function cleanRoute(siteData: SiteData, route: string): string {
function hasTag(head: HeadConfig[], tag: HeadConfig) { function hasTag(head: HeadConfig[], tag: HeadConfig) {
const [tagType, tagAttrs] = tag const [tagType, tagAttrs] = tag
if (tagType !== 'meta') return false
const keyAttr = Object.entries(tagAttrs)[0] // First key const keyAttr = Object.entries(tagAttrs)[0] // First key
if (keyAttr == null) return false if (keyAttr == null) return false
return head.some( return head.some(

Loading…
Cancel
Save