1
0
mirror of synced 2025-12-23 21:07:12 -05:00

return early, do not run on empty array

This commit is contained in:
Sarah Schneider
2021-05-17 15:41:27 -04:00
parent 848ead500f
commit 0235ab938c

View File

@@ -51,7 +51,8 @@ indexFiles
data.externalProducts = englishHomepageData.externalProducts
}
const linkItems = content.match(linksArray) || []
const linkItems = content.match(linksArray)
if (!linkItems) return
// Turn the `{% link /<link> %}` list into an array of /<link> items
if (documentType === 'product' || documentType === 'mapTopic') {