Skip to content

Commit

Permalink
fix build-effect failed (cocos#11537)
Browse files Browse the repository at this point in the history
  • Loading branch information
SantyWang authored Jun 16, 2022
1 parent a0fe333 commit 0a67155
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cocos/core/data/garbage-collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ declare class FinalizationRegistry {
const targetSymbol = Symbol('[[target]]');

class GarbageCollectionManager {
private _finalizationRegistry: FinalizationRegistry | null = EDITOR && FinalizationRegistry ? new FinalizationRegistry(this.finalizationRegistryCallback.bind(this)) : null;
private _finalizationRegistry: FinalizationRegistry | null = EDITOR && typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry(this.finalizationRegistryCallback.bind(this)) : null;
private _gcObjects: WeakMap<any, GCObject> = new WeakMap();

public registerGCObject (gcObject: GCObject): GCObject {
Expand Down

0 comments on commit 0a67155

Please sign in to comment.