-
Notifications
You must be signed in to change notification settings - Fork 132
Add a check to avoid app crash when the products list is empty #11490
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
Conversation
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
.fetchProductList( | ||
productFilterOptions = mapOf(ProductFilterOption.STATUS to ProductStatus.PUBLISH.value) | ||
).getOrNull() | ||
?.filterNot { it.isSampleProduct } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed this issue while working on this, when the cached list is empty, I was fetching a new list from the API, but I was checking against the list of all products, and not just published non-sample products.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirming the fix works 👍
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Closes: #11489
Description
During the code cleanup after enabling Dynamic Dashboard feature, I removed the status
Hidden
from the Blaze card as it wasn't relevant anymore (the card visibility is handled by the parent ViewModel), but this has caused a crash in some cases, the testing instructions will explain those cases.Testing instructions
release/18.6
.issue/11489-fix-blaze-card-crash
Images/gif
RELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.