From e7209a2a6e2e964dcafaaf4b5df1b93caa6fa23d Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Tue, 27 Feb 2018 12:56:49 +0530 Subject: [PATCH] minor fix --- dist/frappe-datatable.cjs.js | 2 +- dist/frappe-datatable.js | 2 +- docs/frappe-datatable.js | 2 +- src/datamanager.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/frappe-datatable.cjs.js b/dist/frappe-datatable.cjs.js index e194a4e..d76056b 100644 --- a/dist/frappe-datatable.cjs.js +++ b/dist/frappe-datatable.cjs.js @@ -1254,7 +1254,7 @@ class DataManager { const cells = this.rows.map(row => row[colIndex]); cells.forEach(cell => { - const hay = cell.content.toLowerCase(); + const hay = (cell.content || '').toLowerCase(); const needle = (keyword || '').toLowerCase(); if (!needle || hay.includes(needle)) { diff --git a/dist/frappe-datatable.js b/dist/frappe-datatable.js index fab99f7..89493d4 100644 --- a/dist/frappe-datatable.js +++ b/dist/frappe-datatable.js @@ -1253,7 +1253,7 @@ class DataManager { const cells = this.rows.map(row => row[colIndex]); cells.forEach(cell => { - const hay = cell.content.toLowerCase(); + const hay = (cell.content || '').toLowerCase(); const needle = (keyword || '').toLowerCase(); if (!needle || hay.includes(needle)) { diff --git a/docs/frappe-datatable.js b/docs/frappe-datatable.js index fab99f7..89493d4 100644 --- a/docs/frappe-datatable.js +++ b/docs/frappe-datatable.js @@ -1253,7 +1253,7 @@ class DataManager { const cells = this.rows.map(row => row[colIndex]); cells.forEach(cell => { - const hay = cell.content.toLowerCase(); + const hay = (cell.content || '').toLowerCase(); const needle = (keyword || '').toLowerCase(); if (!needle || hay.includes(needle)) { diff --git a/src/datamanager.js b/src/datamanager.js index 3569118..6995d7f 100644 --- a/src/datamanager.js +++ b/src/datamanager.js @@ -407,7 +407,7 @@ export default class DataManager { const cells = this.rows.map(row => row[colIndex]); cells.forEach(cell => { - const hay = cell.content.toLowerCase(); + const hay = String(cell.content || '').toLowerCase(); const needle = (keyword || '').toLowerCase(); if (!needle || hay.includes(needle)) {