mirror of
https://github.com/flynx/features.js.git
synced 2025-10-29 18:30:11 +00:00
bugfix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
227f533be2
commit
32f3f77565
18
features.js
18
features.js
@ -148,6 +148,9 @@ object.Constructor('Feature', {
|
|||||||
// - mixin if available...
|
// - mixin if available...
|
||||||
// - base object (currently implemented)
|
// - base object (currently implemented)
|
||||||
// should the first be done?
|
// should the first be done?
|
||||||
|
// ...the andlers should theoreticly be stored neither in the
|
||||||
|
// instance nor in the mixin but rather in the action-set itself
|
||||||
|
// on feature creation... (???)
|
||||||
setup: function(actions){
|
setup: function(actions){
|
||||||
var that = this
|
var that = this
|
||||||
|
|
||||||
@ -251,25 +254,24 @@ object.Constructor('Feature', {
|
|||||||
if(tag != null && obj.tag != null && obj.tag != tag){
|
if(tag != null && obj.tag != null && obj.tag != tag){
|
||||||
throw new Error('tag and obj.tag mismatch, either use one or both must match.') }
|
throw new Error('tag and obj.tag mismatch, either use one or both must match.') }
|
||||||
|
|
||||||
// action...
|
// actions...
|
||||||
if(obj instanceof actions.Action){
|
if(obj instanceof actions.Action){
|
||||||
if(tag == null){
|
if(tag == null){
|
||||||
throw new Error('need a tag to make a feature out of an action') }
|
throw new Error('need a tag to make a feature out of an action') }
|
||||||
var f = {
|
obj = {
|
||||||
|
|
||||||
tag: tag,
|
tag: tag,
|
||||||
actions: obj,
|
actions: obj,
|
||||||
}
|
}
|
||||||
obj = f
|
|
||||||
|
|
||||||
// meta-feature...
|
// meta-feature...
|
||||||
} else if(obj.constructor === Array){
|
} else if(obj.constructor === Array){
|
||||||
if(tag == null){
|
if(tag == null){
|
||||||
throw new Error('need a tag to make a meta-feature') }
|
throw new Error('need a tag to make a meta-feature') }
|
||||||
var f = {
|
obj = {
|
||||||
tag: tag,
|
tag: tag,
|
||||||
suggested: obj,
|
suggested: obj,
|
||||||
}
|
} }
|
||||||
obj = f }
|
|
||||||
|
|
||||||
// feature-set...
|
// feature-set...
|
||||||
if(feature_set){
|
if(feature_set){
|
||||||
@ -478,8 +480,8 @@ object.Constructor('FeatureSet', {
|
|||||||
all
|
all
|
||||||
: lst
|
: lst
|
||||||
lst = lst instanceof Array ?
|
lst = lst instanceof Array ?
|
||||||
[lst]
|
lst
|
||||||
: lst
|
: [lst]
|
||||||
|
|
||||||
//isDisabled = isDisabled || function(){ return false }
|
//isDisabled = isDisabled || function(){ return false }
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ig-features",
|
"name": "ig-features",
|
||||||
"version": "3.4.3",
|
"version": "3.4.4",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "features.js",
|
"main": "features.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user