Skip to content

Commit

Permalink
Merge pull request #282 from julianpoy/remove-pepperplate-empty-labels
Browse files Browse the repository at this point in the history
Filter and toLowerCase pepperplate labels
  • Loading branch information
julianpoy authored Jul 2, 2019
2 parents 426abf2 + d9831dd commit 781df63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Backend/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ router.get(
ingredients: [].slice.call(document.querySelectorAll('.inggroups li ul li span.content')).map(function (el) { return el.innerText }).join("\r\n"),
instructions: [].slice.call(document.querySelectorAll('.dirgroups li ol li span')).map(function (el) { return el.innerText }).join("\r\n"),
imageURL: (document.getElementById('cphMiddle_cphMain_imgRecipeThumb') || { src: '' }).src,
rawCategories: (document.querySelector('#cphMiddle_cphMain_pnlTags span') || { innerText: '' }).innerText.split(',').map(function (el) { return el.trim() })
rawCategories: (document.querySelector('#cphMiddle_cphMain_pnlTags span') || { innerText: '' }).innerText.split(',').map(function (el) { return el.trim().toLowerCase() }).filter(el => el && el.length > 0)
}

return Promise.resolve(els)
Expand Down

0 comments on commit 781df63

Please sign in to comment.