stupid bug fixed...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-06-28 03:20:53 +03:00
parent 4041123bba
commit ff52adbfea
2 changed files with 8 additions and 5 deletions

View File

@ -609,15 +609,18 @@ var FeatureSetProto = {
var loaded = Object.keys(features) var loaded = Object.keys(features)
Object.keys(exclusive) Object.keys(exclusive)
.forEach(function(k){ .forEach(function(k){
var l = exclusive[k].length
exclusive[k] = exclusive[k] exclusive[k] = exclusive[k]
.map(function(e, i){ return [e, i] }) .map(function(e, i){ return [e, i] })
.sort(function(a, b){ .sort(function(a, b){
var i = loaded.indexOf(a[0]) var i = loaded.indexOf(a[0])
var j = loaded.indexOf(b[0]) var j = loaded.indexOf(b[0])
return (i >= 0 && j >= 0) ? // keep the missing at the end...
i - j i = i < 0 ? Infinity : i
: a[1] - b[1] j = j < 0 ? Infinity : j
}) // NOTE: Infinity - Infinity is NaN, so we need
// to guard against it...
return i - j || 0 })
.map(function(e){ return e[0] }) }) .map(function(e){ return e[0] }) })
// do the actual handling... // do the actual handling...
var conflicts = {} var conflicts = {}

View File

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