whatwg/url

Redundant condition in #fragment-state

rshadr opened this issue · 1 comments

rshadr commented

https://url.spec.whatwg.org/commit-snapshots/eee49fdf4f99d59f717cbeb0bce29fda930196d4/#fragment-state

fragment state

    If c is not the EOF code point, then:​ 

At this point c can't be EOF, since the basic URL parser says:

  1. Keep running the following state machine by switching on state. If after a run pointer points to the EOF code point, go to the next step. Otherwise, increase pointer by 1 and continue with the state machine.
annevk commented

If the input is the empty string and state override is the fragment state I think you hit this. Try removing it in https://github.com/jsdom/whatwg-url and see what happens.