Skip to content

Commit 19e82b9

Browse files
committed
fix(scan): filter out empty targets in get_targets_hit method
1 parent 09aeed2 commit 19e82b9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/db/models.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ pub struct ScanEvent {
103103

104104
impl ScanEvent {
105105
pub fn get_targets_hit(&self) -> Vec<String> {
106-
self.targets_hit.split(',').map(|s| s.to_string()).collect()
106+
self.targets_hit
107+
.split(',')
108+
.map(|s| s.to_string())
109+
.filter(|s| !s.is_empty())
110+
.collect()
107111
}
108112

109113
pub fn add_target_hit(&mut self, target: &str) {

0 commit comments

Comments
 (0)