This commit is contained in:
2
index.js
2
index.js
@@ -41,7 +41,7 @@ function cleanWebsite(str) {
|
||||
}
|
||||
|
||||
function metaDescription({ name, meta, description }) {
|
||||
if (meta.length > 155 || meta.length < 145 && meta.length !== 0) {
|
||||
if (meta && (meta.length > 155 || meta.length < 145 && meta.length !== 0)) {
|
||||
console.log(`warning: meta tag for ${name} is invalid: 145/${meta.length}/155`)
|
||||
}
|
||||
return meta || description.length > 155 ? description.slice(0, 153) + "..." : description || "A guide to and map of every independent bookstore in New York City. We have a complete list of community bookstores in NYC with locations and descriptions."
|
||||
|
Reference in New Issue
Block a user