From c1cabb86803fbf9b158a9f32758cfe558cba3b63 Mon Sep 17 00:00:00 2001 From: Sebastian Zivota Date: Tue, 26 Nov 2024 12:06:42 +0100 Subject: [PATCH] fix(js): Prefer debug_id --- symbolic-debuginfo/src/js.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/symbolic-debuginfo/src/js.rs b/symbolic-debuginfo/src/js.rs index 5da34c8e..c637b18f 100644 --- a/symbolic-debuginfo/src/js.rs +++ b/symbolic-debuginfo/src/js.rs @@ -31,10 +31,10 @@ pub fn discover_sourcemaps_location(contents: &str) -> Option<&str> { /// Quickly reads the embedded `debug_id` key from a source map. /// /// Both `debugId` and `debug_id` are supported as field names. If both -/// are set, the former takes precedence. +/// are set, the latter takes precedence. pub fn discover_sourcemap_embedded_debug_id(contents: &str) -> Option { // Deserialize from `"debugId"` or `"debug_id"`, - // preferring the former. + // preferring the latter. #[derive(Deserialize)] struct DebugIdInSourceMap { #[serde(rename = "debugId")] @@ -45,7 +45,7 @@ pub fn discover_sourcemap_embedded_debug_id(contents: &str) -> Option { serde_json::from_str(contents) .ok() - .and_then(|x: DebugIdInSourceMap| x.debug_id_new.or(x.debug_id_old)) + .and_then(|x: DebugIdInSourceMap| x.debug_id_old.or(x.debug_id_new)) } /// Parses a `debugId` comment in a file to discover a sourcemap's debug ID.