We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
JSBluetoothDevice
1 parent 2f0eae8 commit b75da55Copy full SHA for b75da55
Sources/JavaScriptKit/JS Types/JSBluetoothDevice.swift
@@ -22,9 +22,16 @@ public final class JSBluetoothDevice: JSType {
22
23
public lazy var id: String = self.jsObject.get("id").string!
24
25
- public lazy var name: String = self.jsObject.name.string!
26
-
+ public lazy var name: String? = self.jsObject.name.string
+}
27
+
28
+// MARK: - CustomStringConvertible
29
30
+extension JSBluetoothDevice: CustomStringConvertible {
31
32
+ public var description: String {
33
+ return "JSBluetoothDevice(id: \(id), name: \(name ?? "nil"))"
34
+ }
35
}
36
37
// MARK: - Identifiable
0 commit comments