mirror of
https://github.com/flynx/features.js.git
synced 2025-10-28 09:50:10 +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...
|
||||
// - base object (currently implemented)
|
||||
// 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){
|
||||
var that = this
|
||||
|
||||
@ -251,25 +254,24 @@ object.Constructor('Feature', {
|
||||
if(tag != null && obj.tag != null && obj.tag != tag){
|
||||
throw new Error('tag and obj.tag mismatch, either use one or both must match.') }
|
||||
|
||||
// action...
|
||||
// actions...
|
||||
if(obj instanceof actions.Action){
|
||||
if(tag == null){
|
||||
throw new Error('need a tag to make a feature out of an action') }
|
||||
var f = {
|
||||
obj = {
|
||||
|
||||
tag: tag,
|
||||
actions: obj,
|
||||
}
|
||||
obj = f
|
||||
|
||||
// meta-feature...
|
||||
} else if(obj.constructor === Array){
|
||||
if(tag == null){
|
||||
throw new Error('need a tag to make a meta-feature') }
|
||||
var f = {
|
||||
obj = {
|
||||
tag: tag,
|
||||
suggested: obj,
|
||||
}
|
||||
obj = f }
|
||||
} }
|
||||
|
||||
// feature-set...
|
||||
if(feature_set){
|
||||
@ -478,8 +480,8 @@ object.Constructor('FeatureSet', {
|
||||
all
|
||||
: lst
|
||||
lst = lst instanceof Array ?
|
||||
[lst]
|
||||
: lst
|
||||
lst
|
||||
: [lst]
|
||||
|
||||
//isDisabled = isDisabled || function(){ return false }
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ig-features",
|
||||
"version": "3.4.3",
|
||||
"version": "3.4.4",
|
||||
"description": "",
|
||||
"main": "features.js",
|
||||
"scripts": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user