Mercurial > pub > ImplabJs
diff src/implab/safe.js @ 13:3d4abbce4afc
fixed safe.async function
author | cin |
---|---|
date | Fri, 08 Sep 2017 13:44:45 +0300 |
parents | f0035923ff3e |
children | 8332e287d552 |
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); }; },