Skip to content

Commit 6dbead4

Browse files
lposenCopilot
andauthored
refactor: update ios/RNIterableAPI/ReactIterableAPI.swift with copilot suggestion
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 29ba514 commit 6dbead4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

ios/RNIterableAPI/ReactIterableAPI.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,11 @@ import React
315315
public func updateUser(dataFields: NSDictionary, mergeNestedObjects: Bool) {
316316
ITBInfo()
317317
IterableAPI.updateUser(
318-
(dataFields as? [AnyHashable: Any])!, mergeNestedObjects: mergeNestedObjects)
318+
guard let fields = dataFields as? [AnyHashable: Any] else {
319+
ITBError("Could not cast dataFields to [AnyHashable: Any]")
320+
return
321+
}
322+
IterableAPI.updateUser(fields, mergeNestedObjects: mergeNestedObjects)
319323
}
320324

321325
@objc(updateEmail:authToken:)

0 commit comments

Comments
 (0)