Skip to content

url: Fix error type in constructor

Currently whatwg URLs fail with an incorrect error when null is passed as the base. Adding a check before accessing a symbol for the URL makes the URL error correctly.

Add test for it.

Fixes: https://github.com/nodejs/node/issues/19254

cc @targos @nodejs/url

Merge request reports

Loading