From 07a3225fc31614313e0bdd4b77318bab8fbe0712 Mon Sep 17 00:00:00 2001 From: alexlamsl Date: Mon, 30 Mar 2020 04:43:56 +0800 Subject: [PATCH] handle single-field segments --- lib/sourcemap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sourcemap.js b/lib/sourcemap.js index 3ca9f9a8..232cfabd 100644 --- a/lib/sourcemap.js +++ b/lib/sourcemap.js @@ -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];