diff options
author | Graeme Yeates <yeatesgraeme@gmail.com> | 2016-01-04 09:10:08 -0500 |
---|---|---|
committer | Graeme Yeates <yeatesgraeme@gmail.com> | 2016-01-04 09:10:08 -0500 |
commit | 85f5be9ccbd1055178d14162916d9757303d468c (patch) | |
tree | 9afd7dd7ebaea267428feb428f55e818ce9875a9 /lib/ensureAsync.js | |
parent | 08af90ee6d5ef09447b5abfb0cfb6fcff35ecb2e (diff) | |
download | async-85f5be9ccbd1055178d14162916d9757303d468c.tar.gz |
Avoid including lodash string parsing in bundle
Diffstat (limited to 'lib/ensureAsync.js')
-rw-r--r-- | lib/ensureAsync.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ensureAsync.js b/lib/ensureAsync.js index 8b7b208..ae5f131 100644 --- a/lib/ensureAsync.js +++ b/lib/ensureAsync.js @@ -7,6 +7,7 @@ import setImmediate from './internal/setImmediate'; export default function ensureAsync(fn) { return rest(function (args) { var callback = args.pop(); + var sync = true; args.push(function () { var innerArgs = arguments; if (sync) { @@ -17,7 +18,6 @@ export default function ensureAsync(fn) { callback.apply(null, innerArgs); } }); - var sync = true; fn.apply(this, args); sync = false; }); |