mirror of
https://github.com/bower/bower.git
synced 2026-04-24 03:00:19 -04:00
Fix dependants not being correctly set in some edge cases.
This commit is contained in:
@@ -357,16 +357,17 @@ Manager.prototype._parseDependencies = function (decEndpoint, pkgMeta, jsonKey)
|
||||
}, this);
|
||||
|
||||
if (compatible) {
|
||||
// If the compatible's target is equal, do not add to the resolved
|
||||
// If the compatible target is equal, do not add to the resolved
|
||||
if (compatible.target === childDecEndpoint.target) {
|
||||
decEndpoint.dependencies[key] = compatible;
|
||||
compatible.dependants.push(decEndpoint);
|
||||
compatible.dependants = this._uniquify(compatible.dependants);
|
||||
// Copy resolved info from the compatible one
|
||||
// Otherwise copy resolved info from the compatible one
|
||||
} else {
|
||||
childDecEndpoint.canonicalDir = compatible.canonicalDir;
|
||||
childDecEndpoint.pkgMeta = compatible.pkgMeta;
|
||||
childDecEndpoint.dependencies = compatible.dependencies;
|
||||
childDecEndpoint.dependants = [decEndpoint];
|
||||
this._resolved[key].push(childDecEndpoint);
|
||||
}
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user