make Prettier
This commit is contained in:
parent
038b6cac33
commit
dd206891d5
|
@ -1,7 +1,7 @@
|
|||
(function (exports) {
|
||||
'use strict';
|
||||
(function(exports) {
|
||||
"use strict";
|
||||
|
||||
exports.batchAsync = function (limit, arr, doStuff) {
|
||||
exports.batchAsync = function(limit, arr, doStuff) {
|
||||
arr = arr.slice(0);
|
||||
return new Promise(function(resolve, reject) {
|
||||
var total = arr.length;
|
||||
|
@ -48,7 +48,7 @@ exports.batchAsync = function (limit, arr, doStuff) {
|
|||
// add support for sync by rapping in a promise
|
||||
Promise.resolve(p)
|
||||
.then(function(result) {
|
||||
if ('undefined' === typeof result) {
|
||||
if ("undefined" === typeof result) {
|
||||
throw new Error(
|
||||
"result was 'undefined'. Please return 'null' to signal that you didn't just forget to return another promise."
|
||||
);
|
||||
|
@ -66,6 +66,5 @@ exports.batchAsync = function (limit, arr, doStuff) {
|
|||
|
||||
doMoreStuff();
|
||||
});
|
||||
};
|
||||
|
||||
}('undefined' !== typeof window ? window : module.exports));
|
||||
};
|
||||
})("undefined" !== typeof window ? window : module.exports);
|
||||
|
|
Loading…
Reference in New Issue