Skip to content

Commit

Permalink
fix(harper.js): overriding null config value
Browse files Browse the repository at this point in the history
  • Loading branch information
elijah-potter committed Feb 22, 2025
1 parent 807efaf commit 75d6fe4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion harper-core/src/linting/lint_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,13 @@ impl LintGroupConfig {
///
/// Conflicting keys will be overridden by the value in the other group.
pub fn merge_from(&mut self, other: &mut LintGroupConfig) {
self.inner.extend(other.inner.drain());
for (key, val) in other.inner.drain() {
if val.is_none() {
continue;
}

self.inner.insert(key, val);
}
}

/// Fill the group with the values for the curated lint group.
Expand Down

0 comments on commit 75d6fe4

Please sign in to comment.