Skip to content

Commit 43a33ee

Browse files
committed
Fix build errors
1 parent ae62488 commit 43a33ee

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Runtime/src/index.ts

+4-6
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,15 @@ class SwiftRuntimeHeap {
120120
export class SwiftRuntime {
121121
private instance: WebAssembly.Instance | null;
122122
private heap: SwiftRuntimeHeap;
123-
private functionRegistry: FinalizationRegistry;
123+
private functionRegistry: FinalizationRegistry<unknown>;
124124
private version: number = 701;
125125

126126
constructor() {
127127
this.instance = null;
128128
this.heap = new SwiftRuntimeHeap();
129-
if (typeof FinalizationRegistry !== "undefined") {
130-
this.functionRegistry = new FinalizationRegistry(
131-
this.handleFree.bind(this)
132-
);
133-
}
129+
this.functionRegistry = new FinalizationRegistry(
130+
this.handleFree.bind(this)
131+
);
134132
}
135133

136134
handleFree(id: unknown) {

0 commit comments

Comments
 (0)