Do not crash when storage proposal is not ready#418
Merged
Conversation
3fbd7b3 to
90e7ea1
Compare
dgdavid
commented
Feb 8, 2023
6 tasks
imobachgs
approved these changes
Feb 9, 2023
5a7a1aa to
bdfec4c
Compare
Co-Authored-By: Imobach González Sosa <igonzalezsosa@suse.com>
bdfec4c to
c41bdd6
Compare
Merged
bmwiedemann
pushed a commit
to bmwiedemann/openSUSE
that referenced
this pull request
Feb 16, 2023
https://build.opensuse.org/request/show/1066106 by user IGonzalezSosa + dimstar_suse - Version 0.7 - Do not use a proxy to get the errors lists (gh#agama-project/agama#424). - Add live reloading feature for easing the front-end development process (gh#agama-project/agama#419). - Fix storage section crashing when proposal is not ready (gh#agama-project/agama#418). - Better handling of software repositories (gh#agama-project/agama#414): * Report issues when reading the software repositories. * Inform the user about the software proposal progress. * Add a button to reload the repositories (gh#agama-project/agama#388). - Added a button for displaying the YaST logs (related to gh#agama-project/agama#379) - UI fixes (gh#agama-project/agama#401): * Add a fallback height for the layout * Fix some miss-alignments * Add missing icon * Ensure tooling serving and loading fo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After commit f0db9e4, the UI crashes "silently" the first time a product is selected after running the service. Hard to explain why (maybe @imobachgs or @joseivanlopez can edit this description for adding more info)
Solution
To protect the code by using the optional chaining (?) operator AND intercepting the broken promise for returning
undefined. I.e., adapting the code for returning an empty object when the proposal does not exist yet or is not.valid.Testing
Screenshots
Look at the content of the Storage section after selecting the product for first time, not only to the errors in the console.
The console output in the after screenshot has no relation with this issue. It comes from Software section and will be dropped soon.