fix(plugin-web): Prevent overwriting keywords

This commit is contained in:
Sven Friedrich 2022-06-28 22:34:21 +02:00 committed by GitHub
parent 69c1b849a7
commit 790ab0b95f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,7 +16,7 @@ impl Config {
for rule in rules.rules {
let idx = self.queries.insert(rule.queries);
for keyword in rule.matches {
self.matches.insert(keyword, idx as u32);
self.matches.entry(keyword).or_insert(idx as u32);
}
}
}