mirror of
https://github.com/flynx/features.js.git
synced 2025-10-28 18:00:11 +00:00
stupid bug fixed...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
4041123bba
commit
ff52adbfea
11
features.js
11
features.js
@ -609,15 +609,18 @@ var FeatureSetProto = {
|
||||
var loaded = Object.keys(features)
|
||||
Object.keys(exclusive)
|
||||
.forEach(function(k){
|
||||
var l = exclusive[k].length
|
||||
exclusive[k] = exclusive[k]
|
||||
.map(function(e, i){ return [e, i] })
|
||||
.sort(function(a, b){
|
||||
var i = loaded.indexOf(a[0])
|
||||
var j = loaded.indexOf(b[0])
|
||||
return (i >= 0 && j >= 0) ?
|
||||
i - j
|
||||
: a[1] - b[1]
|
||||
})
|
||||
// keep the missing at the end...
|
||||
i = i < 0 ? Infinity : i
|
||||
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] }) })
|
||||
// do the actual handling...
|
||||
var conflicts = {}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ig-features",
|
||||
"version": "3.1.8",
|
||||
"version": "3.1.9",
|
||||
"description": "",
|
||||
"main": "features.js",
|
||||
"scripts": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user