Skip to content

Don't force unwrap storedData #101

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

Merged
merged 1 commit into from
Nov 5, 2018
Merged

Don't force unwrap storedData #101

merged 1 commit into from
Nov 5, 2018

Conversation

dbmrq
Copy link
Contributor

@dbmrq dbmrq commented Nov 5, 2018

My app has the option to save and restore backups of the user's data, so the contents of one Realm database are sometimes copied to another. That means CreamAsset objects can be copied without the underlying data being copied along with them. That causes IceCream to crash when force unwrapping Data(contentsOf: filePath). And storedData() is already optional anyway, so there's no reason to force unwrap it anyway.

@caiyue1993
Copy link
Owner

caiyue1993 commented Nov 5, 2018

You're right and this issue was ignored by myself.
Gonna be merged. Thanks.

@caiyue1993 caiyue1993 merged commit 4102fce into caiyue1993:master Nov 5, 2018
@dbmrq
Copy link
Contributor Author

dbmrq commented Nov 6, 2018

No problem, thanks! 🍺

@dbmrq dbmrq deleted the nounwrap branch November 6, 2018 01:01
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.

2 participants