mirror of
https://github.com/flynx/features.js.git
synced 2025-10-29 18:30: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)
|
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 = {}
|
||||||
|
|||||||
@ -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": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user