Skip to content

Fix bug with original null mappings#2748

Merged
devongovett merged 1 commit into
masterfrom
fix-sourcemap-bug
Mar 8, 2019
Merged

Fix bug with original null mappings#2748
devongovett merged 1 commit into
masterfrom
fix-sourcemap-bug

Conversation

@DeMoorJasper

@DeMoorJasper DeMoorJasper commented Mar 8, 2019

Copy link
Copy Markdown
Member

↪️ Pull Request

If an original mapping had null and that map needed to be extended (aka null mappings from node_modules & TS).
originalPositionFor tried to get the location of this mapping.

Fixes #2738

💻 Examples

https://github.com/ross-pfahler/parcel-sourcemap-bug (note: remove yarn.lock if using yarn as it uses the Adobe corp artifactory)

🚨 Test instructions

Run the Repo it should work. Probably gonna add a test for this though.

Tried to write a test for this but it seems hard to write a minimal repro testcase for this. This was probably also the reason I never added tests for sourcemaps in node_modules.

✔️ PR Todo

  • Added/updated unit tests for this change
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

@devongovett devongovett merged commit 2c65fbf into master Mar 8, 2019
@devongovett devongovett deleted the fix-sourcemap-bug branch March 8, 2019 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot read property 'line' of null when generating sourcemaps

2 participants