From 31987e9704038254f56ac7796b9f2ce3f9613755 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Sat, 11 Jan 2014 11:40:30 +0000 Subject: [PATCH] Check result type, if it's not 'data' quietly reject - fixes warning in multi-part responses --- phpgwapi/js/jsapi/egw_data.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/phpgwapi/js/jsapi/egw_data.js b/phpgwapi/js/jsapi/egw_data.js index 7902179414..2dca87ee4f 100644 --- a/phpgwapi/js/jsapi/egw_data.js +++ b/phpgwapi/js/jsapi/egw_data.js @@ -38,8 +38,11 @@ egw.extend("data", egw.MODULE_APP_LOCAL, function (_app, _wnd) { function parseServerResponse(_result, _callback, _context) { - // Check whether the result is valid -- so "result" has to be an object - // consting of "order" and "data" + // Check whether the result is valid + // This result is not for us, quietly return + if(_result && typeof _result.type != 'undefined' && _result.type != 'data') return; + + // "result" has to be an object consting of "order" and "data" if (!(_result && typeof _result.order !== "undefined" && typeof _result.data !== "undefined")) {