Skip to content

Commit 9123494

Browse files
authored
Merge pull request #14 from jridgewell/source-less
Fix a crash when the segment does not point to a source file
2 parents 5cfe36e + 370c66a commit 9123494

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@
484484
}
485485

486486
// Update the original text area when the source changes
487-
const otherSource = index => sm.sources[index].name;
487+
const otherSource = index => index === -1 ? 'unmapped' : sm.sources[index].name;
488488
const originalName = index => sm.names[index];
489489
originalTextArea = null;
490490
if (sm.sources.length > 0) {

0 commit comments

Comments
 (0)