We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6105c33 commit 7e7fe97Copy full SHA for 7e7fe97
Sources/JavaScriptKit/JSValue.swift
@@ -120,14 +120,14 @@ extension JSValue {
120
/// - Precondition: `self` must be a JavaScript Object.
121
public subscript(dynamicMember name: String) -> JSValue {
122
get { self.object![name] }
123
- set { self.object![name] = newValue }
+ nonmutating set { self.object![name] = newValue }
124
}
125
126
/// An unsafe convenience method of `JSObject.subscript(_ index: Int) -> JSValue`
127
128
public subscript(_ index: Int) -> JSValue {
129
get { object![index] }
130
- set { object![index] = newValue }
+ nonmutating set { object![index] = newValue }
131
132
133
0 commit comments