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

Handle null author image #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jgreenbaum
Copy link

Some realworld servers return null for the image field on the author json if it hasn't been set. One example is the Rust based realworld-tide server. If you create a new profile with that server and this UI before these changes, you'll get a "Deserialize Error". With this patch the author image field changes from a String to an Option<String>, like bio already is, and the html uses "" for the image source if it is null.

Some servers return null for the image field on the author json. One
example is the Rust based
https://github.com/colinbankier/realworld-tide. If you create a new
profile with that server and this UI before these changes, you'll
get a "Deserialize Error". With this patch the author image field
changes from a String to an Option<String>, like bio.
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.

1 participant