diff --git a/actions.js b/actions.js index bc569f5..fa7e8f5 100755 --- a/actions.js +++ b/actions.js @@ -499,6 +499,7 @@ parseStringAction.callAction = function(context, action, ...args){ return context[action.action] instanceof Function ? context[action.action] .apply(context, this.resolveArgs(context, action.arguments, args)) + // action not found or is not callable... (XXX) : undefined } parseStringAction.applyAction = function(context, action, args){ @@ -628,8 +629,12 @@ function Action(name, doc, ldoc, attrs, func){ func = args.pop() last = args[args.length-1] attrs = last != null && typeof(last) != typeof('str') ? args.pop() : {} - doc = typeof(args[0]) == typeof('str') ? args.shift() : null - ldoc = typeof(args[0]) == typeof('str') ? args.shift() : null + doc = typeof(args[0]) == typeof('str') ? args.shift() + : func.doc ? func.doc + : null + ldoc = typeof(args[0]) == typeof('str') ? args.shift() + : func.long_doc ? func.long_doc + : null // populate the action attributes... //meth.name = name diff --git a/package.json b/package.json index 4af8ba9..c1a92fc 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ig-actions", - "version": "3.15.0", + "version": "3.16.0", "description": "", "main": "actions.js", "scripts": {