Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/zone.js/lib/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ export const isMix: boolean =
!isWebWorker &&
!!(isWindowExists && internalWindow['HTMLElement']);

const zoneSymbolEventNames: {[eventName: string]: string} = {};
// tslint:disable-next-line:no-toplevel-property-access
const zoneSymbolEventNames: {[eventName: string]: string} = Object.create(null);

const enableBeforeunloadSymbol = zoneSymbol('enable_beforeunload');

Expand Down
4 changes: 2 additions & 2 deletions packages/zone.js/lib/zone-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ export function initZone(): ZoneType {
}

static __load_patch(name: string, fn: PatchFn, ignoreDuplicate = false): void {
if (patches.hasOwnProperty(name)) {
if (Object.hasOwn(patches, name)) {
// `checkDuplicate` option is defined from global variable
// so it works for all modules.
// `ignoreDuplicate` can work for the specified module
Expand Down Expand Up @@ -1601,7 +1601,7 @@ export function initZone(): ZoneType {
macroTask: 'macroTask' = 'macroTask',
eventTask: 'eventTask' = 'eventTask';

const patches: {[key: string]: any} = {};
const patches: {[key: string]: any} = Object.create(null);
const _api: ZonePrivate = {
symbol: __symbol__,
currentZoneFrame: () => _currentZoneFrame,
Expand Down
7 changes: 4 additions & 3 deletions packages/zone.js/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"es2015.iterable",
"es2015.promise",
"es2015.symbol",
"es2015.symbol.wellknown"
],
},
"es2015.symbol.wellknown",
"es2022.object"
]
}
}
Loading