mirror of
https://github.com/flynx/actions.js.git
synced 2025-10-28 18:00:11 +00:00
minor tweak...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
7b23e84dcc
commit
2f8250d75d
12
actions.js
12
actions.js
@ -394,9 +394,9 @@ module.UNDEFINED = ASIS(undefined)
|
|||||||
// XXX is this correct??
|
// XXX is this correct??
|
||||||
// NOTE: by default an action will return 'this', i.e. the action set
|
// NOTE: by default an action will return 'this', i.e. the action set
|
||||||
// object the action was called from.
|
// object the action was called from.
|
||||||
// NOTE: if func.nmae is set to '<action-name>' it will be reset to the
|
// NOTE: if func.nmae is set to '<action-name>' or it is '' (anonymous
|
||||||
// action name by Action(..). This is a means for extending functions
|
// function) it will be reset to the action name by Action(..). This
|
||||||
// to get the specific action name.
|
// is a means for extending functions to get the specific action name.
|
||||||
// Example:
|
// Example:
|
||||||
// var getActionName = function(func){
|
// var getActionName = function(func){
|
||||||
// var f = function(...args){
|
// var f = function(...args){
|
||||||
@ -786,10 +786,8 @@ object.Constructor('Action', Function, {
|
|||||||
|
|
||||||
meth.func = func
|
meth.func = func
|
||||||
|
|
||||||
if(func.name == '<action-name>'){
|
;(func.name == '' || func.name == '<action-name>')
|
||||||
Object.defineProperty(func, 'name', {
|
&& Object.defineProperty(func, 'name', { value: name })
|
||||||
value: name,
|
|
||||||
}) }
|
|
||||||
|
|
||||||
// make introspection be a bit better...
|
// make introspection be a bit better...
|
||||||
meth.toString = function(){
|
meth.toString = function(){
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ig-actions",
|
"name": "ig-actions",
|
||||||
"version": "3.24.20",
|
"version": "3.24.21",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "actions.js",
|
"main": "actions.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user