mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-13 06:50:09 +01:00
fix: empty candidates
This commit is contained in:
parent
3215fe45f6
commit
998b27f879
1 changed files with 3 additions and 0 deletions
|
|
@ -281,6 +281,9 @@ pub fn add_candidates_no_dup(
|
||||||
) {
|
) {
|
||||||
for candidate in new_candidates {
|
for candidate in new_candidates {
|
||||||
let candidate = candidate.trim();
|
let candidate = candidate.trim();
|
||||||
|
if candidate.is_empty() {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if candidate != command && !candidates.contains(&candidate.to_string()) {
|
if candidate != command && !candidates.contains(&candidate.to_string()) {
|
||||||
candidates.push(candidate.to_string());
|
candidates.push(candidate.to_string());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue