Skip to content

Commit

Permalink
fix: use as_ref
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmaddock committed Jan 9, 2025
1 parent 4ae2c8c commit f0add7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/symbolicator-js/src/lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ impl SourceMapLookup {
for frame in &mut stacktrace.frames {
// NOTE: some older JS SDK versions did not correctly strip a leading `async `
// prefix from the `abs_path`, which we will work around here.
if let Some(abs_path) = frame.abs_path.and_then(|s| s.strip_prefix("async ")) {
if let Some(abs_path) = frame.abs_path.as_ref().and_then(|s| s.strip_prefix("async ")) {
frame.abs_path = Some(abs_path.to_owned());
}

Expand Down

0 comments on commit f0add7a

Please sign in to comment.