mirror of
https://github.com/bower/bower.git
synced 2026-04-24 03:00:19 -04:00
Fixed an infinite recursion bug
This commit is contained in:
@@ -371,6 +371,8 @@ Manager.prototype._failFast = function () {
|
||||
};
|
||||
|
||||
Manager.prototype._parseDependencies = function (decEndpoint, pkgMeta, jsonKey) {
|
||||
var pending = [];
|
||||
|
||||
decEndpoint.dependencies = decEndpoint.dependencies || {};
|
||||
|
||||
// Parse package dependencies
|
||||
@@ -426,10 +428,7 @@ Manager.prototype._parseDependencies = function (decEndpoint, pkgMeta, jsonKey)
|
||||
}, this);
|
||||
|
||||
if (compatible) {
|
||||
compatible.promise
|
||||
.then(function () {
|
||||
this._parseDependencies(decEndpoint, pkgMeta, jsonKey);
|
||||
}.bind(this));
|
||||
pending.push(compatible.promise);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -442,6 +441,13 @@ Manager.prototype._parseDependencies = function (decEndpoint, pkgMeta, jsonKey)
|
||||
childDecEndpoint.dependants = [decEndpoint];
|
||||
this._fetch(childDecEndpoint);
|
||||
}, this);
|
||||
|
||||
if (pending.length > 0) {
|
||||
Q.all(pending)
|
||||
.then(function () {
|
||||
this._parseDependencies(decEndpoint, pkgMeta, jsonKey);
|
||||
}.bind(this));
|
||||
}
|
||||
};
|
||||
|
||||
Manager.prototype._dissect = function () {
|
||||
|
||||
Reference in New Issue
Block a user