From 9bf7452041ece6e7a0b95c227d7e2fe5045872df Mon Sep 17 00:00:00 2001 From: Ludo Stellingwerff Date: Thu, 26 Nov 2015 10:33:01 +0100 Subject: [PATCH] Prevent potential null pointer error --- lib/DataSet.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/DataSet.js b/lib/DataSet.js index 25ede879..a5cc956d 100644 --- a/lib/DataSet.js +++ b/lib/DataSet.js @@ -241,6 +241,9 @@ DataSet.prototype.update = function (data, senderId) { var fieldId = me._fieldId; var addOrUpdate = function (item) { + if (!item){ + return; + } var id = item[fieldId]; if (me._data[id]) { var oldData = util.extend({}, me._data[id]);