Fix response actions

This commit is contained in:
Dennis Eichhorn 2018-03-30 17:04:54 +02:00
parent f6e2f23ece
commit fa8a454803

View File

@ -218,8 +218,9 @@
try {
const o = JSON.parse(xhr.response),
response = new jsOMS.Message.Response.Response(o);
let tempResponse = null,
successInject = null;
let successInject = null;
console.log(response);
if (typeof o.status !== 'undefined') {
self.app.notifyManager.send(
@ -228,9 +229,9 @@
}
if ((successInject = form.getSuccess()) !== null) {
successInject(tempResponse);
successInject(response);
} else {
self.app.responseManager.run(tempResponse.type, tempResponse, request);
self.app.responseManager.run(response.get(0).type, response.get(0), request);
}
} catch (e) {
console.log(e);