Mercurial > pub > ImplabJs
changeset 13:3d4abbce4afc
fixed safe.async function
author | cin |
---|---|
date | Fri, 08 Sep 2017 13:44:45 +0300 |
parents | 8705103f074f |
children | 5fd2a35d65c0 |
files | src/implab/safe.js |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/implab/safe.js Mon Aug 21 18:03:00 2017 +0300 +++ b/src/implab/safe.js Fri Sep 08 13:44:45 2017 +0300 @@ -175,12 +175,10 @@ } } - return /** @this */ function () { - try { - return wrapresult(fn.apply(this, arguments)); - } catch (e) { - return wrapresult(null, e); - } + try { + return wrapresult(fn.apply(thisArg, arguments)); + } catch (e) { + return wrapresult(null, e); }; },