aboutsummaryrefslogtreecommitdiff
path: root/src-ui/src
diff options
context:
space:
mode:
Diffstat (limited to 'src-ui/src')
-rw-r--r--src-ui/src/main.ts15
1 files changed, 11 insertions, 4 deletions
diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts
index 3b2d2f7d..e733cf4d 100644
--- a/src-ui/src/main.ts
+++ b/src-ui/src/main.ts
@@ -21,10 +21,17 @@ async function get_northstar_version_number_and_set_button_accordingly(omniButto
if (northstar_version_number && northstar_version_number.length > 0) {
globalState.installed_northstar_version = northstar_version_number;
omniButtonEl.textContent = `${button_play_string} (${northstar_version_number})`;
- let northstar_is_outdated = await invoke("check_is_northstar_outdated", { gamePath: globalState.gamepath }) as boolean;
- if (northstar_is_outdated) {
- omniButtonEl.textContent = button_update_string;
- }
+ await invoke("check_is_northstar_outdated", { gamePath: globalState.gamepath })
+ .then((message) => {
+ console.log(message);
+ if (message) {
+ omniButtonEl.textContent = button_update_string;
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ alert(error);
+ });
}
}