source-map-cli icon indicating copy to clipboard operation
source-map-cli copied to clipboard

Could not resolve mapping: Cannot read properties of null (reading 'split')

Open marcinchwedczuk-asana opened this issue 1 year ago • 0 comments

When the source map does not contain sourcesContent property the app crashes with:

Could not resolve mapping:  Cannot read properties of null (reading 'split')

This can be easily fixed by testing for if (!text) { ... } instead of if (text === null) { ... } in: https://github.com/gabmontes/source-map-cli/blob/3002de970ee4221add57e5430199c755411c2321/src/lineSlicer.js#L4 to also include undefined in the test condition.

marcinchwedczuk-asana avatar Jan 22 '25 11:01 marcinchwedczuk-asana