From 2e7495306fb0daa0e8e36d04cb5e0ef2044ae29d Mon Sep 17 00:00:00 2001 From: DarkGenius Date: Wed, 23 Nov 2016 16:18:40 +0300 Subject: [PATCH] fix: row id may be equal to 0 In original source code row will be skipped, if id == 0 (because 0 be cast to false), but zero is possible value. --- editablegrid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editablegrid.js b/editablegrid.js index 1c3de8d..777381f 100644 --- a/editablegrid.js +++ b/editablegrid.js @@ -529,7 +529,7 @@ EditableGrid.prototype.update = function(object) if (object.data) for (var i = 0; i < object.data.length; i++) { var row = object.data[i]; - if (!row.id || !row.values) continue; + if (row.id == undefined || !row.values) continue; // get row to update in our model var rowIndex = this.getRowIndex(row.id);