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

Spec: minor bug in "decode source map sources"? #173

Open
takikawa opened this issue Mar 4, 2025 · 1 comment
Open

Spec: minor bug in "decode source map sources"? #173

takikawa opened this issue Mar 4, 2025 · 1 comment

Comments

@takikawa
Copy link
Collaborator

takikawa commented Mar 4, 2025

In the decode source map sources algorithm, step 4.d. says this:

If sourcesContent’s size is greater than or equal to index, set decodedSource’s content to sourcesContent[index].

I think the size >= index check here instead should be size > index.

If sources has 3 items, and sourcesContent has 2 items then you can have iteration on [0, 1, 2] indices. If index = 2, and size = 2 then size >= index but sourcesContent[2] is undefined.

@jridgewell
Copy link
Member

You're correct.

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

No branches or pull requests

2 participants