Skip to content

Commit 5982bef

Browse files
committed
wip
1 parent e6b6705 commit 5982bef

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: Sources/JavaScriptKit/FundamentalObjects/JSObject.swift

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,18 @@ public class JSObject: 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)