Skip to content

Commit

Permalink
fix: Show error message in case of failure (#812)
Browse files Browse the repository at this point in the history
Shows an error message if retrieving release notes failed instead of just doing nothing.
  • Loading branch information
GeckoEidechse authored Feb 14, 2024
1 parent 90dba46 commit d45f096
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src-vue/src/plugins/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,13 @@ export const store = createStore<FlightCoreStore>({
},
async fetchReleaseNotes(state: FlightCoreStore) {
if (state.releaseNotes.length !== 0) return;
state.releaseNotes = await invoke("get_northstar_release_notes");
await invoke<ReleaseInfo[]>("get_northstar_release_notes")
.then((message) => {
state.releaseNotes = message;
})
.catch((error) => {
showErrorNotification(error);
});
},
async fetchThunderstoreMods(state: FlightCoreStore) {
// To check if some Thunderstore mods are already installed/outdated, we need to load locally-installed mods.
Expand Down

0 comments on commit d45f096

Please sign in to comment.