fixed and odd bug that should have broken everything but broke almost nothing...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-11-26 00:39:32 +03:00
parent 0459aff378
commit 7dc96e86b9
2 changed files with 3 additions and 2 deletions

View File

@ -205,9 +205,10 @@ Object.assign(
action = typeof(action) == typeof('str') ?
this(action)
: action
var root = context
var {context, name} = this.resolveAction(context, action.action)
return (context && context[name] instanceof Function) ?
context[name](context, ...this.resolveArgs(context, action.arguments, args))
context[name](...this.resolveArgs(root, action.arguments, args))
// action not found or is not callable...
// XXX should this break if action does not exist???
: undefined },

View File

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