From f4bb70012b4b63b643b34c0045b5da63c5548eb2 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 15 Jan 2019 05:16:52 +0300 Subject: [PATCH] more fixing... Signed-off-by: Alex A. Naanou --- actions.js | 19 ++++++++++--------- package.json | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/actions.js b/actions.js index d4f770d..90f611d 100755 --- a/actions.js +++ b/actions.js @@ -903,15 +903,16 @@ Action.prototype.post = function(context, data){ .forEach(function(func){ func.call(context) }) // top calls... - if(context.__action_after_running - && context.__action_after_running[0] == null){ - ;(context.__action_after_running[1] || []) - .forEach(function(func){ - func.call(context) }) - delete context.__action_after_running - // back to prev level... - } else { - context.__action_after_running = context.__action_after_running[0] + if(context.__action_after_running){ + if(context.__action_after_running[0] == null){ + ;(context.__action_after_running[1] || []) + .forEach(function(func){ + func.call(context) }) + delete context.__action_after_running + // back to prev level... + } else { + context.__action_after_running = context.__action_after_running[0] + } } return res diff --git a/package.json b/package.json index 542bab6..a05f30e 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ig-actions", - "version": "3.22.1", + "version": "3.22.2", "description": "", "main": "actions.js", "scripts": {