mirror of
https://github.com/flynx/features.js.git
synced 2025-10-28 09:50:10 +00:00
cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
d3122cb15d
commit
b58209530d
16
features.js
16
features.js
@ -710,7 +710,7 @@ var FeatureSetProto = {
|
||||
// Handle exclusive feature groups and aliases...
|
||||
var conflicts = {}
|
||||
var done = []
|
||||
var aliases = []
|
||||
var to_remove = []
|
||||
Object.keys(features)
|
||||
.forEach(function(f){
|
||||
// alias...
|
||||
@ -733,11 +733,10 @@ var FeatureSetProto = {
|
||||
// remove the alias...
|
||||
// NOTE: exclusive tag can match a feature tag, thus
|
||||
// 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...
|
||||
if(!(f in that)){
|
||||
aliases.push(f)
|
||||
}
|
||||
!(f in that)
|
||||
&& to_remove.push(f)
|
||||
// replace dependencies...
|
||||
Object.keys(features)
|
||||
.forEach(function(e){
|
||||
@ -761,11 +760,8 @@ var FeatureSetProto = {
|
||||
}
|
||||
}
|
||||
})
|
||||
// XXX remove exclusive aliases...
|
||||
aliases
|
||||
.forEach(function(f){
|
||||
delete features[f]
|
||||
})
|
||||
// cleanup...
|
||||
to_remove.forEach(function(f){ delete features[f] })
|
||||
// resolve any exclusivity conflicts found...
|
||||
var excluded = []
|
||||
Object.keys(conflicts)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user