textContent replaces innerText

This commit is contained in:
Luke Smith 2022-05-26 20:01:39 -04:00
parent b7f117cf4c
commit 95133388ea
No known key found for this signature in database
GPG Key ID: 4C50B54A911F6252

View File

@ -27,7 +27,7 @@ document.addEventListener('DOMContentLoaded', () => {
// for each recipe hide all but matched // for each recipe hide all but matched
let matchCount = 0; let matchCount = 0;
rec.forEach(el => { rec.forEach(el => {
const recipeName = el.innerText.toLowerCase() const recipeName = el.textContent.toLowerCase()
const isMatch = recipeName.includes(searchText) const isMatch = recipeName.includes(searchText)
el.hidden = !isMatch el.hidden = !isMatch