minor fixes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-08-10 03:26:50 +03:00
parent 6c5343a8b3
commit 93bb5a183f
2 changed files with 9 additions and 4 deletions

View File

@ -751,6 +751,10 @@ function Alias(alias, doc, ldoc, attrs, target){
doc = (!doc && parsed) ? parsed.doc : doc doc = (!doc && parsed) ? parsed.doc : doc
var func = function(){ var func = function(){
// empty alias...
if(target == ''){
return
}
// parse the target... // parse the target...
// XXX should we cache here??? // XXX should we cache here???
var action = parsed || this.parseStringAction(target) var action = parsed || this.parseStringAction(target)
@ -766,7 +770,7 @@ function Alias(alias, doc, ldoc, attrs, target){
return meth.alias.code || meth.alias } return meth.alias.code || meth.alias }
// make the action... // make the action...
var meth = Action(alias, doc, null, attrs, func) var meth = Action(alias, doc, ldoc, attrs, func)
meth.__proto__ = this.__proto__ meth.__proto__ = this.__proto__
meth.func.alias = target meth.func.alias = target
@ -822,7 +826,7 @@ module.MetaActions = {
var that = this var that = this
return this.actions return this.actions
.filter(function(n){ .filter(function(n){
return Object.hasOwnProperty(this, n) return that.hasOwnProperty(n)
&& that[n] instanceof Alias }) }, && that[n] instanceof Alias }) },
// XXX move this to the right spot... // 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... // action-set, thus we need to know about it here...
|| !(arg[arg.length-1] instanceof Function || !(arg[arg.length-1] instanceof Function
|| (typeof(arg[arg.length-1]) == typeof('str') || (typeof(arg[arg.length-1]) == typeof('str')
&& (arg[arg.length-1] == ''
// XXX should this be stricter??? // XXX should this be stricter???
&& (obj.isStringAction || isStringAction)(arg[arg.length-1]))) ){ || (obj.isStringAction || isStringAction)(arg[arg.length-1])))) ){
//*/ //*/
return return
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "ig-actions", "name": "ig-actions",
"version": "3.5.3", "version": "3.5.4",
"description": "", "description": "",
"main": "actions.js", "main": "actions.js",
"scripts": { "scripts": {