Closed jyriandr closed 2 years ago
Can you produce a small piece of code, that uses whatwg-url and nothing else, which we can run to debug? We'll close that issue until then as this is not enough detail to help with; please comment with that reproduction file and we can reopen.
I'm getting an error when trying to connect to a local mongodb. It seems that the problem is in this line of code in
whatwg-url
https://github.com/jsdom/whatwg-url/blob/5f8ab9a06ffce2eacb75e949a43b23e573c42d6c/lib/url-state-machine.js#L523this.input = Array.from(this.input, c => c.codePointAt(0));
For some reason, when mapping the input from characters to codes the
c.codePointAt(0)
is returning the initial character. That fails the check on line 527:const cStr = isNaN(c) ? undefined : String.fromCodePoint(c);