Skip to content

fix(source-map-consumer): validate line and column in originalPositionFor - #559

Open
user-Param wants to merge 1 commit into
mozilla:masterfrom
user-Param:fix/450-null-args-v2
Open

user-Param wants to merge 1 commit into
mozilla:masterfrom
user-Param:fix/450-null-args-v2

Conversation

@user-Param

Copy link
Copy Markdown

Fixes #450 - originalPositionFor was not validating that line and column arguments are provided. When called with null/undefined or missing line/column, needle.generatedLine would be undefined, and undefined < 1 evaluates to false, allowing NaN to propagate into native code. Now throws a clear error when line or column is missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeError: Cannot read property 'indexOf' of null

2 participants