diff options
author | Rémy Raes <contact@remyraes.com> | 2022-12-21 15:03:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-21 15:03:20 +0100 |
commit | b9287e9ac74312b5efee8c13e3164a3352d5d09d (patch) | |
tree | 41cd38daa060cb7fc1e121dcee9af700ca60dda9 /src-vue/src/plugins | |
parent | f7b508525fc1d13bafdc3f0987aa46348ac275e7 (diff) | |
download | FlightCore-b9287e9ac74312b5efee8c13e3164a3352d5d09d.tar.gz FlightCore-b9287e9ac74312b5efee8c13e3164a3352d5d09d.zip |
fix: Mod view with no game install (#114)
* refactor: set installedMods as a ModsView computed property
* feat: display a message on ModsView instead of cards if no mods were found
* refactor: remove error notification on game path discovery failure
* Revert "refactor: remove error notification on game path discovery failure"
This reverts commit db4af9ff78dc17bda77ce94283e35f9f1e961086.
* fix: don't invoke get_installed_mods_caller with no game path set
Diffstat (limited to 'src-vue/src/plugins')
-rw-r--r-- | src-vue/src/plugins/store.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts index b51f97e5..3776a6c5 100644 --- a/src-vue/src/plugins/store.ts +++ b/src-vue/src/plugins/store.ts @@ -238,6 +238,13 @@ export const store = createStore<FlightCoreStore>({ game_path: state.game_path, install_type: state.install_type } as GameInstall; + + // If there's no game path, prevent looking for installed mods. + if (state.game_path === undefined) { + console.warn('Cannot load installed mods since so game path is selected.'); + return; + } + // Call back-end for installed mods await invoke("get_installed_mods_caller", { gameInstall: game_install }) .then((message) => { |