Skip to content

Commit 2d3b249

Browse files
danielbayleyNicolas Porter
authored and
Nicolas Porter
committed
Ignore false matches from CoffeeScript codebase
I'm not sure this is the best fix for this bug, which was hard to track down! But I have also attempted to address it here: https://github.com/evanw/node-source-map-support/pull/283… although looking at the activity on that repo, I don't have much hope of it being merged any time soon… Hence the reason for this PR. See also: evanw/node-source-map-support#254
1 parent b2171d5 commit 2d3b249

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/util.js

+2
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,8 @@ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflate
488488
* JSON.
489489
*/
490490
function parseSourceMapInput(str) {
491+
// Ignore false matches from CoffeeScript codebase.
492+
if (str.startsWith('zw(u')) return { version: 3, sources: [], mappings: [] }
491493
return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ""));
492494
}
493495
exports.parseSourceMapInput = parseSourceMapInput;

0 commit comments

Comments
 (0)