bugfix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2018-02-14 16:04:01 +03:00
parent abd5da3dac
commit d3122cb15d
2 changed files with 10 additions and 2 deletions

View File

@ -710,6 +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 = []
Object.keys(features) Object.keys(features)
.forEach(function(f){ .forEach(function(f){
// alias... // alias...
@ -732,8 +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
// get added/expanded back in by other features...
if(!(f in that)){ if(!(f in that)){
delete features[f] aliases.push(f)
} }
// replace dependencies... // replace dependencies...
Object.keys(features) Object.keys(features)
@ -758,6 +761,11 @@ var FeatureSetProto = {
} }
} }
}) })
// XXX remove exclusive aliases...
aliases
.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)

View File

@ -1,6 +1,6 @@
{ {
"name": "ig-features", "name": "ig-features",
"version": "3.3.2", "version": "3.3.3",
"description": "", "description": "",
"main": "features.js", "main": "features.js",
"scripts": { "scripts": {