Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
fix(safari) - webworker objects have no .hasOwnProperty method, use
Browse files Browse the repository at this point in the history
 Object.getOwnPropertyNames(proto).indexOf(name) === -1
  • Loading branch information
nadavsinai committed Sep 29, 2016
1 parent 51f2e1f commit 7da0c52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand Down

0 comments on commit 7da0c52

Please sign in to comment.