fix(router): fix error when calling ParamMap.get function (#31599)
fix this.params.hasOwnProperty is not a function in case of creating an object using Object.create() PR Close #31599
This commit is contained in:

committed by
Andrew Kushnir

parent
80d0067048
commit
2170ea270a
@ -74,7 +74,7 @@ class ParamsAsMap implements ParamMap {
|
||||
}
|
||||
|
||||
has(name: string): boolean {
|
||||
return this.params.hasOwnProperty(name);
|
||||
return Object.prototype.hasOwnProperty.call(this.params, name);
|
||||
}
|
||||
|
||||
get(name: string): string|null {
|
||||
|
Reference in New Issue
Block a user