Skip to content

Commit e44c343

Browse files
committed
Update JSTypedArray.swift
1 parent 4033285 commit e44c343

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/JavaScriptKit/JSTypedArray.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ public class JSTypedArray<Element>: JSObjectRef, ExpressibleByArrayLiteral where
3030
super.init(id: jsObject.id)
3131
}
3232

33+
public init(wrapping jsObject: JSObjectRef) {
34+
_retain(jsObject.id)
35+
super.init(id: jsObject.id)
36+
}
37+
3338
required public convenience init(arrayLiteral elements: Element...) {
3439
self.init(elements)
3540
}

0 commit comments

Comments
 (0)