From 6c03ba90a2091fbbef8a553ce2639b441628a2ee Mon Sep 17 00:00:00 2001 From: Nathan Mors Date: Fri, 7 Aug 2015 18:50:07 +1000 Subject: [PATCH] Add more error handling handle undefined entityType --- lib/odataServer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/odataServer.js b/lib/odataServer.js index 0f2c2b8..d3227a6 100644 --- a/lib/odataServer.js +++ b/lib/odataServer.js @@ -256,7 +256,7 @@ ODataServer.prototype.bufferToBase64 = function(collection, res) { for (var i in res) { var doc = res[i]; for (var prop in doc) { - if (!prop) + if (!prop || !entityType) continue; var propDef = entityType[prop];