Skip to content

Commit

Permalink
Fixed sanitizeActions.
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.
  • Loading branch information
lupusA committed Jul 9, 2023
1 parent f827689 commit e812162
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 e812162

Please sign in to comment.