Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 86909b3

Browse files
try catch added for form open
1 parent 24811e2 commit 86909b3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/components/todo/TodoBox.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from 'react';
2-
import { Tag, Divider } from 'antd';
32
import { TodoDate, TodoActionControls, TodoLabel } from '../todo';
43

54
export default function TodoBox(props) {

src/forms/todo/modal.form.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ export default function ModalForm() {
1717
}, [editTodoData]);
1818

1919
const showForm = () => {
20-
dispatch(editTodo());
21-
setVisible(true);
20+
try {
21+
dispatch(editTodo());
22+
setVisible(true);
23+
} catch (error) {
24+
console.log('error', error);
25+
}
2226
};
2327

2428
const onClose = () => {

0 commit comments

Comments
 (0)