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:
Anas Barghoud
2019-07-16 23:58:47 +02:00
committed by Andrew Kushnir
parent 80d0067048
commit 2170ea270a
2 changed files with 12 additions and 2 deletions

View File

@ -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 {