Skip to content

Commit b32260f

Browse files
bartlomiejuclaude
andcommitted
fix(core): skip node: frames when selecting error source snippet
The source snippet frame selection logic skipped `ext:` frames but not `node:` frames, causing missing source snippets for errors thrown from node: builtins after the fs consolidation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 861faac commit b32260f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libs/core/error.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,7 @@ impl JsError {
807807
if let (Some(file_name), Some(line_number)) =
808808
(&frame.file_name, frame.line_number)
809809
&& !file_name.trim_start_matches('[').starts_with("ext:")
810+
&& !file_name.starts_with("node:")
810811
{
811812
source_line = source_mapper.get_source_line(file_name, line_number);
812813
source_line_frame_index = Some(i);
@@ -954,6 +955,7 @@ impl JsError {
954955
if let (Some(file_name), Some(line_number)) =
955956
(&frame.file_name, frame.line_number)
956957
&& !file_name.trim_start_matches('[').starts_with("ext:")
958+
&& !file_name.starts_with("node:")
957959
{
958960
source_line = source_mapper.get_source_line(file_name, line_number);
959961
source_line_frame_index = Some(i);

0 commit comments

Comments
 (0)