Skip to content

Commit ed34e77

Browse files
committed
(.location) fix add empty todo item
1 parent 44309ea commit ed34e77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/AddTodo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ let AddTodo = ({ dispatch }) => {
1313
/>
1414
<button
1515
onClick={() => {
16-
dispatch(addTodo(input.value));
16+
input.value && dispatch(addTodo(input.value));
1717
input.value = "";
1818
}}
1919
>

0 commit comments

Comments
 (0)