kenchris / urlpattern-polyfill

URLPattern polyfill
https://www.npmjs.com/package/urlpattern-polyfill
MIT License
267 stars 30 forks source link

TypeError: Failed to construct 'URLPattern': invalid pathname pattern #132

Open mattiaz9 opened 1 month ago

mattiaz9 commented 1 month ago

It looks like it can't handle the + symbol inside the pathname.

For instance this:

import { URLPattern } from "urlpattern-polyfill"

const patterns = new URLPattern({ pathname: "/app/profiles/+" })

Throws this error: TypeError: Failed to construct 'URLPattern': invalid pathname pattern '/app/profiles/+'