Closed wanderview closed 2 years ago
This fixes the problem where:
const p = new URLPattern({ pathname: ':name*' }); const r = p.exec('foobar'); console.log(r.pathname.groups.name);
Would log 'r' instead of 'foobar'.
This is an upstream bug in path-to-regexp:
https://github.com/pillarjs/path-to-regexp/issues/260
This commit essentially applies the proposed fix in:
https://github.com/pillarjs/path-to-regexp/pull/261
And adds the WPT tests from:
https://chromium-review.googlesource.com/c/chromium/src/+/3123654
@kenchris PTAL
This fixes the problem where:
const p = new URLPattern({ pathname: ':name*' }); const r = p.exec('foobar'); console.log(r.pathname.groups.name);
Would log 'r' instead of 'foobar'.
This is an upstream bug in path-to-regexp:
https://github.com/pillarjs/path-to-regexp/issues/260
This commit essentially applies the proposed fix in:
https://github.com/pillarjs/path-to-regexp/pull/261
And adds the WPT tests from:
https://chromium-review.googlesource.com/c/chromium/src/+/3123654