File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed
Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -195,19 +195,7 @@ extension Project {
195195 attributes = jsonDictionary. json ( atKeyPath: " attributes " ) ?? [ : ]
196196 include = jsonDictionary. json ( atKeyPath: " include " ) ?? [ ]
197197 if jsonDictionary [ " packages " ] != nil {
198- packages = try jsonDictionary. json ( atKeyPath: " packages " , invalidItemBehaviour: . custom( { error in
199- guard error. reason == . incorrectType && type ( of: error. expectedType. self) == String . Type. self else {
200- return . fail
201- }
202- var pairs = [ ( String, Any) ] ( )
203- for item in error. dictionary {
204- pairs. append ( (
205- item. key as? String ?? " " ,
206- ( item. value as? LosslessStringConvertible ) . map { String ( $0) } ?? item. value
207- ) )
208- }
209- return ( try ? . value( . init( jsonDictionary: . init( uniqueKeysWithValues: pairs) ) ) ) ?? . fail
210- } ) )
198+ packages = try jsonDictionary. json ( atKeyPath: " packages " , invalidItemBehaviour: . fail)
211199 } else {
212200 packages = [ : ]
213201 }
You can’t perform that action at this time.
0 commit comments