Skip to content

Commit 5025e4d

Browse files
committed
wip
1 parent ddcd9dc commit 5025e4d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Sources/JavaScriptKit/JSObject.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,18 @@ public class JSObjectRef: Equatable {
88
}
99

1010
@_disfavoredOverload
11-
public subscript(dynamicMember name: String) -> ((JSValueConvertible...) -> JSValue)? {
11+
public subscript(_ name: String) -> ((JSValueConvertible...) -> JSValue)? {
1212
guard let function = self[name].function else { return nil }
1313
return { (arguments: JSValueConvertible...) in
1414
function(this: self, arguments: arguments)
1515
}
1616
}
1717

18+
@_disfavoredOverload
19+
public subscript(dynamicMember name: String) -> ((JSValueConvertible...) -> JSValue)? {
20+
self[name]
21+
}
22+
1823
public subscript(dynamicMember name: String) -> JSValue {
1924
get { self[name] }
2025
set { self[name] = newValue }

0 commit comments

Comments
 (0)