diff --git a/com-dict-client/src/components/AddWord/index.js b/com-dict-client/src/components/AddWord/index.js index 77dde09..ca3f71a 100644 --- a/com-dict-client/src/components/AddWord/index.js +++ b/com-dict-client/src/components/AddWord/index.js @@ -75,7 +75,7 @@ function WordForm() { const user = useSelector((state) => state.firebase.auth); const handleAddHeadTerm = () => { - if (category === "") { + if (category === "" || category == null) { return message.error("Please select a category"); } @@ -120,7 +120,9 @@ function WordForm() {
@@ -168,7 +171,8 @@ function WordForm() { placeholder="New head term" /> - + +