Merge pull request #1855 from albertgasset/MOBILE-2838
MOBILE-2838 site: Fix checking whether no response is expectedmain
commit
0daf5191ff
|
@ -867,7 +867,8 @@ export class CoreSite {
|
||||||
} else {
|
} else {
|
||||||
let responseData = this.textUtils.parseJSON(response.data);
|
let responseData = this.textUtils.parseJSON(response.data);
|
||||||
// Match the behaviour of CoreWSProvider.call when no response is expected.
|
// Match the behaviour of CoreWSProvider.call when no response is expected.
|
||||||
if (!responseData && (typeof wsPresets.responseExpected == 'undefined' || wsPresets.responseExpected)) {
|
const responseExpected = typeof wsPresets.responseExpected == 'undefined' || wsPresets.responseExpected;
|
||||||
|
if (!responseExpected && (responseData == null || responseData === '')) {
|
||||||
responseData = {};
|
responseData = {};
|
||||||
}
|
}
|
||||||
request.deferred.resolve(responseData);
|
request.deferred.resolve(responseData);
|
||||||
|
|
Loading…
Reference in New Issue