bugfix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-12-19 05:49:37 +03:00
parent 227f533be2
commit 32f3f77565
2 changed files with 11 additions and 9 deletions

View File

@ -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 }

View File

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