Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug with original null mappings #2748

Merged
merged 1 commit into from
Mar 8, 2019
Merged

Conversation

DeMoorJasper
Copy link
Member

@DeMoorJasper DeMoorJasper commented Mar 8, 2019

↪️ 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