Skip to content

Commit 7defb4a

Browse files
committed
don't show null mappings
The "source-map" library returns null for the original line/column in cases where we previously showed 0 and -1 for the line and column. It seems better to just omit it instead since 0 and -1 are not numbers encoded in the source map.
1 parent 9123494 commit 7defb4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

code.js

Lines changed: 2 additions & 2 deletions
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 => index === -1 ? 'unmapped' : sm.sources[index].name;
487+
const otherSource = index => index === -1 ? null : sm.sources[index].name;
488488
const originalName = index => sm.names[index];
489489
originalTextArea = null;
490490
if (sm.sources.length > 0) {
@@ -1297,7 +1297,7 @@
12971297
}
12981298

12991299
// Update the status bar
1300-
if (hoveredMapping) {
1300+
if (hoveredMapping && hoveredMapping.originalColumn !== -1) {
13011301
if (sourceIndex === null) {
13021302
status = `Line ${hoveredMapping.generatedLine + 1}, Offset ${hoveredMapping.generatedColumn}`;
13031303
if (hoveredMapping.originalName !== -1) {

0 commit comments

Comments
 (0)