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;
|
||||
}
|
||||
this.capture(key);
|
||||
let value: any = 'true';
|
||||
let value: any = '';
|
||||
if (this.peekStartsWith('=')) {
|
||||
this.capture('=');
|
||||
const valueMatch = matchSegments(this.remaining);
|
||||
|
|
|
@ -113,9 +113,9 @@ describe('url serializer', () => {
|
|||
it('should parse key only matrix params', () => {
|
||||
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)', () => {
|
||||
|
|
Loading…
Reference in New Issue