Skip to content

Commit b6602c8

Browse files
committed
Actually fix the tests
1 parent 14ab088 commit b6602c8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Sources/JavaScriptKit/JSTypedArray.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ public class JSTypedArray<Element>: JSObjectRef, ExpressibleByArrayLiteral where
2020
}
2121

2222
public init(length: Int) {
23-
super.init(id: Element.typedArrayClass.new(length).id)
24-
_retain(id)
23+
let jsObject = Element.typedArrayClass.new(length)
24+
_retain(jsObject.id)
25+
super.init(id: jsObject.id)
2526
}
2627

2728
required public convenience init(arrayLiteral elements: Element...) {

0 commit comments

Comments
 (0)