File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
functions/FunctionsExample/FunctionsExample/View Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ struct AddNumbersView: View {
6363 " firstNumber " : $num1. wrappedValue,
6464 " secondNumber " : $num2. wrappedValue,
6565 ] )
66- if let operationResult = ( result as? [ String : Any ] ) ? [ " operationResult " ] as? Int {
66+ if let operationResult = result [ " operationResult " ] {
6767 self . outcome = String ( operationResult)
6868 } else {
6969 self . outcome = " The return result is invalid. "
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ struct CapitalizeMessageView: View {
4646 responseAs: [ String : String ] . self
4747 )
4848 let result = try await function. call ( [ " text " : $comment. wrappedValue] )
49- if let data = result as? [ String : Any ] , let text = data [ " text " ] as? String {
49+ if let text = result [ " text " ] {
5050 self . outcome = text
5151 }
5252 } catch {
You can’t perform that action at this time.
0 commit comments