Api: Always resolve jsonq, even if empty array

Fixes callback was not called if response was []
This commit is contained in:
nathan 2023-04-25 09:10:33 -06:00
parent 759eb22505
commit 95aae678ff

View File

@ -110,6 +110,11 @@ egw.extend('jsonq', egw.MODULE_GLOBAL, function()
json.handleResponse({response: response});
}
}
// Response is there, but empty. Make sure to resolve it or the callback doesn't get called.
if (typeof response.length !== "undefined" && response.length == 0)
{
job.resolve();
}
}
delete jsonq_queue[uid];