diff --git a/code/frontend/src/components/interactive/BoxConditionHashtag.js b/code/frontend/src/components/interactive/BoxConditionHashtag.js index a234e24..b1a5dc6 100644 --- a/code/frontend/src/components/interactive/BoxConditionHashtag.js +++ b/code/frontend/src/components/interactive/BoxConditionHashtag.js @@ -37,6 +37,12 @@ export default function BoxConditionHashtag({ ...props }) { "type": 0, "content": hashtag } + + if(hashtag === "") { + console.debug("Refusing to append ", newCond, " to the Conditions list, as it is empty.") + return + } + let duplicate = null; for(const oldCond of conditions) { if(newCond.type === oldCond.type && newCond.content === oldCond.content) { diff --git a/code/frontend/src/components/interactive/BoxConditionUser.js b/code/frontend/src/components/interactive/BoxConditionUser.js index cc38959..8a89d2b 100644 --- a/code/frontend/src/components/interactive/BoxConditionUser.js +++ b/code/frontend/src/components/interactive/BoxConditionUser.js @@ -36,6 +36,12 @@ export default function BoxConditionUser({ ...props }) { "type": 3, "content": user } + + if(user === "") { + console.debug("Refusing to append ", newCond, " to the Conditions list, as it is empty.") + return + } + let duplicate = null; for(const oldCond of conditions) { if(newCond.type === oldCond.type && newCond.content === oldCond.content) {