mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-27 00:09:13 +01:00
Fix JSON to call callback even if server does not return anything in particular.
This commit is contained in:
parent
ed4476ab30
commit
e103145a53
@ -105,7 +105,7 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
json_request.prototype.handleResponse = function(data) {
|
json_request.prototype.handleResponse = function(data) {
|
||||||
if (data && data.response)
|
if (data && typeof data.response != 'undefined')
|
||||||
{
|
{
|
||||||
// Load files first
|
// Load files first
|
||||||
var js_files = [];
|
var js_files = [];
|
||||||
@ -132,7 +132,7 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Flag for only data response - don't call callback if only data
|
// Flag for only data response - don't call callback if only data
|
||||||
var only_data = true;
|
var only_data = (data.response.length > 0);
|
||||||
|
|
||||||
for (var i = 0; i < data.response.length; i++)
|
for (var i = 0; i < data.response.length; i++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user