feat(11ty): definition is not spelled defintion, definition is not spelled defintion

This commit is contained in:
Oscar 2019-11-15 20:08:41 +01:00
parent ff410b0d49
commit 08d48f1a24

View File

@ -5,10 +5,10 @@ module.exports = function (config) {
config.addFilter('linkTarget', makeItemLink);
config.addFilter('linkIfExistsInCollection', (word, collection) => {
const existingDefintion = collection.find(item => item.data.title === word)
const existingDefinition = collection.find(item => item.data.title === word)
if (existingDefintion) {
return `<a href=${makeItemLink(existingDefintion.data.slug)}>${word}</a>`
if (existingDefinition) {
return `<a href=${makeItemLink(existingDefinition.data.slug)}>${word}</a>`
}
return word