mirror of
https://github.com/bower/bower.git
synced 2026-01-22 20:58:08 -05:00
Fix extra keys being set even if they are undefined.
This commit is contained in:
@@ -191,13 +191,18 @@ Manager.prototype.areCompatible = function (candidate, resolved) {
|
||||
|
||||
Manager.prototype.toData = function (decEndpoint, extraKeys) {
|
||||
var names;
|
||||
var extra;
|
||||
|
||||
var data = {};
|
||||
data.endpoint = mout.object.pick(decEndpoint, ['name', 'source', 'target']);
|
||||
mout.object.mixIn(data, mout.object.pick(decEndpoint, ['canonicalDir', 'pkgMeta']));
|
||||
|
||||
if (extraKeys) {
|
||||
mout.object.mixIn(data, mout.object.pick(decEndpoint, extraKeys));
|
||||
extra = mout.object.pick(decEndpoint, extraKeys);
|
||||
extra = mout.object.filter(extra, function (value) {
|
||||
return !!value;
|
||||
});
|
||||
mout.object.mixIn(data, extra);
|
||||
}
|
||||
|
||||
if (decEndpoint.dependencies) {
|
||||
|
||||
Reference in New Issue
Block a user