Skip to content

Commit

Permalink
build 2.7.7
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinmetcalf committed Jul 1, 2014
1 parent 5bd09c6 commit d04a46c
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 26 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "lie",
"version": "2.7.6"
"version": "2.7.7"
}
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lie",
"version": "2.7.6",
"version": "2.7.7",
"description": "A minimal and fast promise implementation",
"repo": "calvinmetcalf/lie",
"keywords": [],
Expand Down
24 changes: 13 additions & 11 deletions dist/lie.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = function all(iterable) {
}

var len = iterable.length;
var called = false;
if (!len) {
return resolve([]);
}
Expand All @@ -33,11 +34,15 @@ module.exports = function all(iterable) {
return promise;
function allResolver(value, i) {
resolve(value).then(resolveFromAll, function (error) {
handlers.reject(promise, error);
if (!called) {
called = true;
handlers.reject(promise, error);
}
});
function resolveFromAll(outValue) {
values[i] = outValue;
if (++resolved === len) {
if (++resolved === len & !called) {
called = true;
handlers.resolve(promise, values);
}
}
Expand Down Expand Up @@ -294,13 +299,10 @@ function unwrap(promise, func, value) {
}
});
}
},{"./handlers":3,"immediate":14}],13:[function(_dereq_,module,exports){

},{}],14:[function(_dereq_,module,exports){
},{"./handlers":3,"immediate":13}],13:[function(_dereq_,module,exports){
'use strict';
var types = [
_dereq_('./nextTick'),
_dereq_('./mutation.js'),
_dereq_('./messageChannel'),
_dereq_('./stateChange'),
_dereq_('./timeout')
Expand All @@ -326,7 +328,7 @@ var scheduleDrain;
var i = -1;
var len = types.length;
while (++ i < len) {
if (types[i] && types[i].test && types[i].test()) {
if (types[i].test()) {
scheduleDrain = types[i].install(drainQueue);
break;
}
Expand All @@ -337,7 +339,7 @@ function immediate(task) {
scheduleDrain();
}
}
},{"./messageChannel":15,"./mutation.js":16,"./nextTick":13,"./stateChange":17,"./timeout":18}],15:[function(_dereq_,module,exports){
},{"./messageChannel":14,"./nextTick":15,"./stateChange":16,"./timeout":17}],14:[function(_dereq_,module,exports){
(function (global){
'use strict';

Expand All @@ -358,7 +360,7 @@ exports.install = function (func) {
};
};
}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],16:[function(_dereq_,module,exports){
},{}],15:[function(_dereq_,module,exports){
(function (global){
'use strict';
//based off rsvp https://github.com/tildeio/rsvp.js
Expand All @@ -383,7 +385,7 @@ exports.install = function (handle) {
};
};
}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],17:[function(_dereq_,module,exports){
},{}],16:[function(_dereq_,module,exports){
(function (global){
'use strict';

Expand All @@ -410,7 +412,7 @@ exports.install = function (handle) {
};
};
}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],18:[function(_dereq_,module,exports){
},{}],17:[function(_dereq_,module,exports){
'use strict';
exports.test = function () {
return true;
Expand Down
2 changes: 1 addition & 1 deletion dist/lie.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 13 additions & 11 deletions dist/lie.noConflict.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = function all(iterable) {
}

var len = iterable.length;
var called = false;
if (!len) {
return resolve([]);
}
Expand All @@ -33,11 +34,15 @@ module.exports = function all(iterable) {
return promise;
function allResolver(value, i) {
resolve(value).then(resolveFromAll, function (error) {
handlers.reject(promise, error);
if (!called) {
called = true;
handlers.reject(promise, error);
}
});
function resolveFromAll(outValue) {
values[i] = outValue;
if (++resolved === len) {
if (++resolved === len & !called) {
called = true;
handlers.resolve(promise, values);
}
}
Expand Down Expand Up @@ -294,13 +299,10 @@ function unwrap(promise, func, value) {
}
});
}
},{"./handlers":3,"immediate":14}],13:[function(_dereq_,module,exports){

},{}],14:[function(_dereq_,module,exports){
},{"./handlers":3,"immediate":13}],13:[function(_dereq_,module,exports){
'use strict';
var types = [
_dereq_('./nextTick'),
_dereq_('./mutation.js'),
_dereq_('./messageChannel'),
_dereq_('./stateChange'),
_dereq_('./timeout')
Expand All @@ -326,7 +328,7 @@ var scheduleDrain;
var i = -1;
var len = types.length;
while (++ i < len) {
if (types[i] && types[i].test && types[i].test()) {
if (types[i].test()) {
scheduleDrain = types[i].install(drainQueue);
break;
}
Expand All @@ -337,7 +339,7 @@ function immediate(task) {
scheduleDrain();
}
}
},{"./messageChannel":15,"./mutation.js":16,"./nextTick":13,"./stateChange":17,"./timeout":18}],15:[function(_dereq_,module,exports){
},{"./messageChannel":14,"./nextTick":15,"./stateChange":16,"./timeout":17}],14:[function(_dereq_,module,exports){
(function (global){
'use strict';

Expand All @@ -358,7 +360,7 @@ exports.install = function (func) {
};
};
}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],16:[function(_dereq_,module,exports){
},{}],15:[function(_dereq_,module,exports){
(function (global){
'use strict';
//based off rsvp https://github.com/tildeio/rsvp.js
Expand All @@ -383,7 +385,7 @@ exports.install = function (handle) {
};
};
}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],17:[function(_dereq_,module,exports){
},{}],16:[function(_dereq_,module,exports){
(function (global){
'use strict';

Expand All @@ -410,7 +412,7 @@ exports.install = function (handle) {
};
};
}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],18:[function(_dereq_,module,exports){
},{}],17:[function(_dereq_,module,exports){
'use strict';
exports.test = function () {
return true;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lie",
"version": "2.7.6",
"version": "2.7.7",
"description": "A minimal and fast promise implementation",
"license": "MIT",
"repository": {
Expand Down

0 comments on commit d04a46c

Please sign in to comment.