File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -134,9 +134,10 @@ private struct JSObjectKeyedEncodingContainer<Key: CodingKey>: KeyedEncodingCont
134134
135135 func nestedContainer< NestedKey> ( keyedBy keyType: NestedKey . Type , forKey key: Key ) -> KeyedEncodingContainer < NestedKey > where NestedKey: CodingKey
136136 {
137- let encoder = JSValueEncoderImpl ( codingPath: encoder. codingPath)
138- let container = JSObjectKeyedEncodingContainer < NestedKey > ( encoder: encoder)
139- encoder. value = . object( ObjectConstructor . new ( ) )
137+ let nestedEncoder = JSValueEncoderImpl ( codingPath: encoder. codingPath)
138+ let container = JSObjectKeyedEncodingContainer < NestedKey > ( encoder: nestedEncoder)
139+ nestedEncoder. value = . object( ObjectConstructor . new ( ) )
140+ encoder. value [ dynamicMember: key. stringValue] = nestedEncoder. value
140141 return KeyedEncodingContainer ( container)
141142 }
142143
You can’t perform that action at this time.
0 commit comments