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

Provide failsafe against unavailable props #117

Closed
2 tasks done
robbevp opened this issue May 15, 2020 · 1 comment · Fixed by #149
Closed
2 tasks done

Provide failsafe against unavailable props #117

robbevp opened this issue May 15, 2020 · 1 comment · Fixed by #149
Labels
bug Something isn't working

Comments

@robbevp
Copy link
Member

robbevp commented May 15, 2020

If a related property is not available, the app tends to freeze or components will not show up.
This already happens when an object is destroyed but is still refered to on another object (see #77 ), or might happen when loading objects is stuck (for example, due to a network error, see #65).

Once we have #75 merged, this will only become more common, since we won't know the order in which objects are added to the store.

Proposed changes

  • provide a fallback in components (TrackGenres, TrackArtists and AlbumArtists) so that they get displayed even if some of the related objects are missing.
  • provide a fallback in getters (most notably Tracks/tracksByAlbumAndNumber where most of the critical errors seem to occur) so that it will always output something
@robbevp robbevp added the bug Something isn't working label May 15, 2020
@robbevp robbevp added this to the 1.0 milestone May 15, 2020
@chvp
Copy link
Member

chvp commented Jun 6, 2020

This happened when testing #44 and disabled updates for the flagged track count. An album wasn't found. Trace:

TypeError: "rootState.albums.albums[a1.album_id] is undefined"
    tracksFlagged tracks.js:168
    tracksFlagged tracks.js:166
    wrappedGetter vuex.esm.js:822
    partial vuex.esm.js:99
    VueJS 3
    get vuex.esm.js:612
    numberOfFlaggedItems store.js:67
    wrappedGetter vuex.esm.js:822
    partial vuex.esm.js:99
    VueJS 3
    get vuex.esm.js:612
    mappedGetter vuex.esm.js:967
    VueJS 4
    render App.vue:231
    VueJS 7

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

Successfully merging a pull request may close this issue.

2 participants