aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-21 00:34:52 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-21 00:34:52 +0200
commitdaeae77a9a81b1284bd03d287f7ded10dfd558d4 (patch)
tree939d21f0d4cbedc079376c1239cb66c489909b11
parent26dd06fa56989e25b9b64a67fcd9c1a93ee9b778 (diff)
downloadFlightCore-daeae77a9a81b1284bd03d287f7ded10dfd558d4.tar.gz
FlightCore-daeae77a9a81b1284bd03d287f7ded10dfd558d4.zip
Do not access field of potential null object
-rw-r--r--src-ui/src/main.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts
index 1da081e9..dd28fedc 100644
--- a/src-ui/src/main.ts
+++ b/src-ui/src/main.ts
@@ -262,10 +262,10 @@ document.addEventListener("DOMContentLoaded", async function () {
versionNumberHolderEl.textContent = `${version_number_string} (${host_os_string})${outdated_string}`;
// Get preferred Northstar version from persistent store
- const persistent_northstar_package_name = ((await store.get('northstar-package-name')) as any).value;
- if (persistent_northstar_package_name) {
- console.log(persistent_northstar_package_name)
- globalState.northstar_package_name = persistent_northstar_package_name as string;
+ const persistent_northstar_package_name_obj = ((await store.get('northstar-package-name')) as any);
+ if (persistent_northstar_package_name_obj) {
+ console.log(persistent_northstar_package_name_obj)
+ globalState.northstar_package_name = persistent_northstar_package_name_obj.value as string;
// Update checkbox if it's a ReleaseCandidate
// In the future this might be a dropdown menu instead
if (globalState.northstar_package_name === "NorthstarReleaseCandidate") {