Skip to content

Commit

Permalink
Use a shorter condition to detect an empty search string
Browse files Browse the repository at this point in the history
Co-authored-by: stoically <29637501+stoically@users.noreply.github.com>
  • Loading branch information
dannycolin and stoically committed Jul 21, 2022
1 parent f02fb0e commit d557dd4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,7 @@ const Logic = {
for (let i in list) {
let text = list[i].querySelector("td div span");

if (text.innerText.replace(pattern, '').toLowerCase().includes(search) ||
search == "" ||
search == null) {
if (text.innerText.replace(pattern, '').toLowerCase().includes(search) || !search) {
list[i].style.display = "block";
} else {
list[i].style.display = "none";
Expand Down

0 comments on commit d557dd4

Please sign in to comment.