From 5b8be4c5b09a243ed8580cb9667d7658ca249f02 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Tue, 27 Feb 2018 13:07:51 +0530 Subject: [PATCH] Cast cell content to string --- dist/frappe-datatable.cjs.js | 2 +- dist/frappe-datatable.js | 2 +- docs/frappe-datatable.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/frappe-datatable.cjs.js b/dist/frappe-datatable.cjs.js index d76056b..8e71586 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 = String(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 89493d4..67400bf 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 = String(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 89493d4..67400bf 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 = String(cell.content || '').toLowerCase(); const needle = (keyword || '').toLowerCase(); if (!needle || hay.includes(needle)) {