You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
;(async()=>{letmozilla=require('source-map')letmap;map={version: 3,sections: [{offset: {line: 0,column: 0},map: {version: 3,sources: ['123','456'],sourcesContent: ['a\nb\nc\n',''],mappings: 'AAAA;AACA;AACA;'}}]}// this map works for some reason/*map = { version: 3, sources: ['123', '456'], sourcesContent: ['a\nb\nc\n', ''], mappings: 'AAAA;AACA;AACA;' }*/letconsumer=awaitnewmozilla.SourceMapConsumer(map)consumer.sourceRoot=null;// https://github.com/mozilla/source-map/issues/345letgenerator=mozilla.SourceMapGenerator.fromSourceMap(consumer)console.log(generator.toJSON())})().catch(console.log)
This errors out:
Error: "456" is not in the SourceMap.
at IndexedSourceMapConsumer.sourceContentFor (/tmp/node_modules/source-map/lib/source-map-consumer.js:840:11)
at /tmp/node_modules/source-map/lib/source-map-generator.js:82:42
at Array.forEach (<anonymous>)
at Function.fromSourceMap (/tmp/node_modules/source-map/lib/source-map-generator.js:72:32)
at /tmp/123/test.js:29:46
Content is empty - '' - but it is still in the sourcemap. I believe it should be if (content == null) { check, i.e. null or undefined, letting empty string pass along.
this may be related to #345, so tagging it just in case
The text was updated successfully, but these errors were encountered:
This errors out:
The issue is in here somewhere:
source-map/lib/source-map-consumer.js
Line 880 in 7a26340
Content is empty -
''
- but it is still in the sourcemap. I believe it should beif (content == null) {
check, i.e. null or undefined, letting empty string pass along.this may be related to #345, so tagging it just in case
The text was updated successfully, but these errors were encountered: