From 7dc96e86b9351351b29dff8b4c3122d53d30893f Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 26 Nov 2020 00:39:32 +0300 Subject: [PATCH] fixed and odd bug that should have broken everything but broke almost nothing... Signed-off-by: Alex A. Naanou --- actions.js | 3 ++- package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/actions.js b/actions.js index 9d16d9e..7e89ea5 100755 --- a/actions.js +++ b/actions.js @@ -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 }, diff --git a/package.json b/package.json index d98328b..ce0ecdc 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ig-actions", - "version": "3.24.14", + "version": "3.24.15", "description": "", "main": "actions.js", "scripts": {