Skip to content

Commit

Permalink
Fix uncommitted rule deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpai committed Jan 3, 2019
1 parent d525b59 commit afe6dd8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/renderer/store/rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ export function reducer(state = initialState, action = {}) {
// TODO
return state;
case DELETE.REQUEST:
ipcr.send(RTM.RULE.DELETE, id);
if (rule.committedData) {
ipcr.send(RTM.RULE.DELETE, id);
}
return dict.delete(id).state;
case DELETE.FAILURE:
// TODO
Expand Down

0 comments on commit afe6dd8

Please sign in to comment.