Skip to content

new URL(url, null) fails with wrong error #19254

@targos

Description

@targos
> new URL('test', null)
TypeError: Cannot read property 'Symbol(query)' of null
    at new URL (internal/url.js:306:15)

It should probably throw the same error as other invalid URLs: TypeError [ERR_INVALID_URL]: Invalid URL: null

Metadata

Metadata

Assignees

Labels

whatwg-urlIssues and PRs related to the WHATWG URL implementation.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions