Skip to content

Commit

Permalink
fix: πŸ› Fallback to cell content when html is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
netchampfaris committed Dec 7, 2018
1 parent 164979f commit 96c7b72
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/filterRows.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function getFilterMethod(filter) {
contains(keyword, cells) {
return cells
.filter(cell => {
const hay = String(stripHTML(cell.html) || '').toLowerCase();
const hay = String(stripHTML(cell.html || '') || cell.content || '').toLowerCase();
const needle = (keyword || '').toLowerCase();
return !needle || hay.includes(needle);
})
Expand Down Expand Up @@ -68,8 +68,8 @@ function getFilterMethod(filter) {
return filterMethodMap[filter.type];
}

function guessFilter(keyword) {
if (keyword.length === 1) return {};
function guessFilter(keyword = '') {
if (keyword.length === 0) return {};

if (keyword.startsWith('>')) {
if (isNumber(keyword.slice(1))) {
Expand Down

0 comments on commit 96c7b72

Please sign in to comment.