Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use map(to: ) in Combine #21

Closed
ghost opened this issue Nov 6, 2019 · 3 comments
Closed

Cannot use map(to: ) in Combine #21

ghost opened this issue Nov 6, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Nov 6, 2019

When I use TinyNetworking with combine like the example. I cannot use the map(to:) to map the object.
Screen Shot 2019-11-06 at 10 43 03 AM

@jdisho jdisho added the bug Something isn't working label Nov 6, 2019
@jdisho jdisho closed this as completed Jan 21, 2020
@jdisho jdisho reopened this Jan 21, 2020
@asteiman
Copy link
Contributor

asteiman commented Mar 3, 2020

Any update on this?

@jdisho
Copy link
Owner

jdisho commented Mar 3, 2020

I will release an update soon.

But for now, if it helps, you can try this. Should be fine 😊

tinyNetworking
    .requestPublisher(resource: .photo(id: id))
    .compactMap { $0.data }
    .decode(type: Codable.Type, decoder: JSONDecoder())
    .eraseToAnyPublisher()

@jdisho
Copy link
Owner

jdisho commented Mar 21, 2020

Fixed. Released in v.4.0.1. 🚀

@jdisho jdisho closed this as completed Mar 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants