Skip to content

Commit

Permalink
Fixed sanitizeActions. (#163)
Browse files Browse the repository at this point in the history
The method checks for "path" instead of script.
Therefore, all actions are set to undefined and are never saved.

Co-authored-by: Christoph Anderson <[email protected]>
  • Loading branch information
lupusA and lupusA committed Jul 14, 2023
1 parent ed223af commit 56c8528
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PolicyEditor/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 56c8528

Please sign in to comment.