1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-08 11:33:42 +00:00

Updated promise, so rejection is substituted if then() returns a rejected promise

This commit is contained in:
Bryan Roe
2020-05-29 02:33:43 -07:00
parent 5104dd40fe
commit 406543943f
2 changed files with 6 additions and 1 deletions

View File

@@ -102,6 +102,11 @@ function Promise(promiseFunc)
parms.push(arguments[ai]);
}
this._XSLF.emit.apply(this._XSLF, parms);
},
function (e)
{
var parms = ['rejected', e];
this._XSLF.emit.apply(this._XSLF, parms);
}).parentPromise._XSLF = _resolver._self;
}
else