fix(router): fix incorrect url param value coercion of 1 to true
seriliazeParams is coercing a value of 1 to true, which causes the value to be completey dropped. Change the test from double equals to triple equals to prevent this from happening. Closes #5346 Closes #6286
This commit is contained in:
@ -206,7 +206,7 @@ export function serializeParams(paramMap: {[key: string]: any}): string[] {
|
||||
var params = [];
|
||||
if (isPresent(paramMap)) {
|
||||
StringMapWrapper.forEach(paramMap, (value, key) => {
|
||||
if (value == true) {
|
||||
if (value === true) {
|
||||
params.push(key);
|
||||
} else {
|
||||
params.push(key + '=' + value);
|
||||
|
Reference in New Issue
Block a user