From 93bb5a183fc1edd2cd2d8732e79a3dc1a26b2f58 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 10 Aug 2017 03:26:50 +0300 Subject: [PATCH] minor fixes... Signed-off-by: Alex A. Naanou --- actions.js | 11 ++++++++--- package.json | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/actions.js b/actions.js index 025d07f..c1fbe03 100755 --- a/actions.js +++ b/actions.js @@ -751,6 +751,10 @@ function Alias(alias, doc, ldoc, attrs, target){ doc = (!doc && parsed) ? parsed.doc : doc var func = function(){ + // empty alias... + if(target == ''){ + return + } // parse the target... // XXX should we cache here??? var action = parsed || this.parseStringAction(target) @@ -766,7 +770,7 @@ function Alias(alias, doc, ldoc, attrs, target){ return meth.alias.code || meth.alias } // make the action... - var meth = Action(alias, doc, null, attrs, func) + var meth = Action(alias, doc, ldoc, attrs, func) meth.__proto__ = this.__proto__ meth.func.alias = target @@ -822,7 +826,7 @@ module.MetaActions = { var that = this return this.actions .filter(function(n){ - return Object.hasOwnProperty(this, n) + return that.hasOwnProperty(n) && that[n] instanceof Alias }) }, // XXX move this to the right spot... @@ -1899,8 +1903,9 @@ function Actions(a, b){ // action-set, thus we need to know about it here... || !(arg[arg.length-1] instanceof Function || (typeof(arg[arg.length-1]) == typeof('str') + && (arg[arg.length-1] == '' // XXX should this be stricter??? - && (obj.isStringAction || isStringAction)(arg[arg.length-1]))) ){ + || (obj.isStringAction || isStringAction)(arg[arg.length-1])))) ){ //*/ return } diff --git a/package.json b/package.json index 58c5bab..9679c2d 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ig-actions", - "version": "3.5.3", + "version": "3.5.4", "description": "", "main": "actions.js", "scripts": {