Skip to content

Commit

Permalink
fixes searchInAttribute config searching null attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
mp3000mp committed Aug 19, 2020
1 parent 6fa32fe commit e0a8211
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mp3000mp/list-filter",
"version": "0.1.3",
"version": "0.1.4",
"description": "Simple library with no dependencies that help you to hide html list items that do not match a pattern",
"main": "/src/ListFilter.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion src/ListFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ let ListFilter = function (trigger, list, options) {
if(options.searchInAttribute === false){
str = li.textContent;
}else{
str = li.getAttribute(options.searchInAttribute);
str = li.getAttribute(options.searchInAttribute) || '';
}
if(!options.caseSensitive){
return str.toLowerCase();
Expand Down

0 comments on commit e0a8211

Please sign in to comment.