cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2018-02-14 16:06:07 +03:00
parent d3122cb15d
commit b58209530d

View File

@ -710,7 +710,7 @@ var FeatureSetProto = {
// Handle exclusive feature groups and aliases... // Handle exclusive feature groups and aliases...
var conflicts = {} var conflicts = {}
var done = [] var done = []
var aliases = [] var to_remove = []
Object.keys(features) Object.keys(features)
.forEach(function(f){ .forEach(function(f){
// alias... // alias...
@ -733,11 +733,10 @@ var FeatureSetProto = {
// remove the alias... // remove the alias...
// NOTE: exclusive tag can match a feature tag, thus // NOTE: exclusive tag can match a feature tag, thus
// we do not want to delete such tags... // we do not want to delete such tags...
// NOTE: we are not removing aliases here as they may // NOTE: we are not removing to_remove here as they may
// get added/expanded back in by other features... // get added/expanded back in by other features...
if(!(f in that)){ !(f in that)
aliases.push(f) && to_remove.push(f)
}
// replace dependencies... // replace dependencies...
Object.keys(features) Object.keys(features)
.forEach(function(e){ .forEach(function(e){
@ -761,11 +760,8 @@ var FeatureSetProto = {
} }
} }
}) })
// XXX remove exclusive aliases... // cleanup...
aliases to_remove.forEach(function(f){ delete features[f] })
.forEach(function(f){
delete features[f]
})
// resolve any exclusivity conflicts found... // resolve any exclusivity conflicts found...
var excluded = [] var excluded = []
Object.keys(conflicts) Object.keys(conflicts)