handle single-field segments (#3757)
authorAlex Lam S.L <alexlamsl@gmail.com>
Sun, 29 Mar 2020 22:39:32 +0000 (23:39 +0100)
committerGitHub <noreply@github.com>
Sun, 29 Mar 2020 22:39:32 +0000 (06:39 +0800)
lib/sourcemap.js

index 3ca9f9a..232cfab 100644 (file)
@@ -133,7 +133,7 @@ function SourceMap(options) {
                     if (orig_col >= col) indices = segments[i];
                     if (orig_col <= col) break;
                 }
-                if (!indices) return;
+                if (!indices || indices.length < 4) return;
                 source = map.sources[indices[1]];
                 orig_line = indices[2];
                 orig_col = indices[3];