From 56c85280ed43a227fb3ead9a3ed765cde9c2a81e Mon Sep 17 00:00:00 2001 From: Christoph Anderson <37236531+lupusA@users.noreply.github.com> Date: Fri, 14 Jul 2023 05:07:58 +0200 Subject: [PATCH] Fixed sanitizeActions. (#163) The method checks for "path" instead of script. Therefore, all actions are set to undefined and are never saved. Co-authored-by: Christoph Anderson --- src/PolicyEditor/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PolicyEditor/index.jsx b/src/PolicyEditor/index.jsx index 4ad970e..56644cf 100644 --- a/src/PolicyEditor/index.jsx +++ b/src/PolicyEditor/index.jsx @@ -186,7 +186,7 @@ export class PolicyEditor extends Component { sanitizeActions(actions, actionTypes) { actionTypes.forEach(actionType => { if (actions[actionType]) { - if (actions[actionType].path === undefined || actions[actionType].path === "") { + if (actions[actionType].script === undefined || actions[actionType].script === "") { actions[actionType] = undefined; } else { if (actions[actionType].timeout === undefined) {