diff --git a/ui (gen4)/features/peer.js b/ui (gen4)/features/peer.js index d68ff85b..3c3d9838 100755 --- a/ui (gen4)/features/peer.js +++ b/ui (gen4)/features/peer.js @@ -409,11 +409,30 @@ module.ChildProcessPeer = core.ImageGridFeatures.Feature({ // return the value... if(!msg.ignore_return){ - process.send({ - type: 'action-call-result', - id: msg.id, - value: res === that ? null : res, - }) + res.then ? + // promise result... + res + .then(function(res){ + process.send({ + type: 'action-call-result', + id: msg.id, + value: res, + }) + }) + .catch(function(err){ + process.send({ + type: 'action-call-result', + id: msg.id, + error: err, + }) + }) + // normal result... + : process + .send({ + type: 'action-call-result', + id: msg.id, + value: res === that ? null : res, + }) } // error...