diff --git a/Sources/Gamepad/Generated.swift b/Sources/Gamepad/Generated.swift index 3dfb8190..d910c6eb 100644 --- a/Sources/Gamepad/Generated.swift +++ b/Sources/Gamepad/Generated.swift @@ -366,7 +366,8 @@ public class GamepadTouch: JSBridgedClass { public extension Navigator { @inlinable func getGamepads() -> [Gamepad?] { let this = jsObject - return this[Strings.getGamepads].function!(this: this, arguments: []).fromJSValue()! + let jsArray = JSArray(unsafelyWrapping: this[Strings.getGamepads].function!(this: this, arguments: []).object!) + return jsArray.map({Gamepad(from: $0)}) } }