mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-22 04:54:18 +00:00
🔧 Disallow adding empty conditions
This commit is contained in:
parent
12f8058da1
commit
1daa35f9d7
2 changed files with 12 additions and 0 deletions
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue