Skip to content

Conversation

@noahsmartin
Copy link
Member

No description provided.

guard let httpResponse = response as? HTTPURLResponse,
let data = data else {
completion(.failure(RequestError.invalidData))
result = .failure(RequestError.invalidData)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes a bug where the completion handler was being called twice

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@itaybre itaybre merged commit 82fe3c1 into main Jan 23, 2025
2 checks passed
@itaybre itaybre deleted the fixNetworkCallbackIssues branch January 23, 2025 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants