Skip to content

Commit

Permalink
fix: use default value
Browse files Browse the repository at this point in the history
  • Loading branch information
no-yan committed Nov 14, 2024
1 parent 3160e4d commit 5c2a833
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl Rule for NoUselessPromiseResolveReject {
let allow_reject = config
.and_then(|c| c.get("allowReject"))
.and_then(serde_json::Value::as_bool)
.map_or(false, |v| v);
.unwrap_or_default();

Self(Box::new(NoUselessPromiseResolveRejectOptions { allow_reject }))
}
Expand Down

0 comments on commit 5c2a833

Please sign in to comment.