diff options
Diffstat (limited to 'packages/webapi/src/lib/Object.ts')
-rw-r--r-- | packages/webapi/src/lib/Object.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/webapi/src/lib/Object.ts b/packages/webapi/src/lib/Object.ts index 5ad5b1388..cfc1ea4a4 100644 --- a/packages/webapi/src/lib/Object.ts +++ b/packages/webapi/src/lib/Object.ts @@ -3,11 +3,12 @@ import * as _ from './utils' export const hasOwn = { hasOwn(instance: object, property: any) { return _.__object_hasOwnProperty(instance, property) - } + }, }.hasOwn export const initObject = (target: any, exclude: Set<string>) => { - if (exclude.has('Object') || exclude.has('object') || exclude.has('hasOwn')) return + if (exclude.has('Object') || exclude.has('object') || exclude.has('hasOwn')) + return const Class = target.Object || globalThis.Object @@ -15,6 +16,6 @@ export const initObject = (target: any, exclude: Set<string>) => { value: hasOwn, writable: true, enumerable: false, - configurable: true + configurable: true, }) } |