fix(UrlParser) stop setting default value 'true' (matrix params) (#10946)
This was already fixed recently for query params in #10399.
This commit is contained in:
parent
27539c8b80
commit
4a44832114
@ -391,7 +391,7 @@ class UrlParser {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.capture(key);
|
this.capture(key);
|
||||||
let value: any = 'true';
|
let value: any = '';
|
||||||
if (this.peekStartsWith('=')) {
|
if (this.peekStartsWith('=')) {
|
||||||
this.capture('=');
|
this.capture('=');
|
||||||
const valueMatch = matchSegments(this.remaining);
|
const valueMatch = matchSegments(this.remaining);
|
||||||
|
@ -113,9 +113,9 @@ describe('url serializer', () => {
|
|||||||
it('should parse key only matrix params', () => {
|
it('should parse key only matrix params', () => {
|
||||||
const tree = url.parse('/one;a');
|
const tree = url.parse('/one;a');
|
||||||
|
|
||||||
expectSegment(tree.root.children[PRIMARY_OUTLET], 'one;a=true');
|
expectSegment(tree.root.children[PRIMARY_OUTLET], 'one;a=');
|
||||||
|
|
||||||
expect(url.serialize(tree)).toEqual('/one;a=true');
|
expect(url.serialize(tree)).toEqual('/one;a=');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should parse query params (root)', () => {
|
it('should parse query params (root)', () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user