diff --git a/lib/common/utils.ts b/lib/common/utils.ts index 66ae022fe..92af71d2f 100644 --- a/lib/common/utils.ts +++ b/lib/common/utils.ts @@ -347,7 +347,7 @@ export function patchMethod(target: any, name: string, name: string) => (self: any, args: any[]) => any): Function { let proto = target; - while (proto && !proto.hasOwnProperty(name)) { + while (proto && Object.getOwnPropertyNames(proto).indexOf(name) === -1) { proto = Object.getPrototypeOf(proto); } if (!proto && target[name]) {