Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
fixed condition with possibly undefined argument, show advanced setti…
Browse files Browse the repository at this point in the history
…ngs by default if devmode has been turned on
  • Loading branch information
matthme committed Jun 19, 2023
1 parent 8787968 commit eba3c03
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
>
<ToggleSwitch
style="margin-right: 29px"
:sliderOn="!!devHubAppInfo && isAppRunning(devHubAppInfo?.webAppInfo.installed_app_info)"
:sliderOn="devHubAppInfo ? isAppRunning(devHubAppInfo.webAppInfo.installed_app_info) : false"
@click.stop.prevent="toggleDevMode()"
@keydown.enter="toggleDevMode()"
/>
Expand Down Expand Up @@ -527,7 +527,7 @@ export default defineComponent({
},
computed: {
devModeOn() {
return !!this.devHubAppInfo && (isAppRunning(this.devHubAppInfo.webAppInfo.installed_app_info) || isAppPaused(this.devHubAppInfo.webAppInfo.installed_app_info))
return this.devHubAppInfo ? (isAppRunning(this.devHubAppInfo.webAppInfo.installed_app_info) || isAppPaused(this.devHubAppInfo.webAppInfo.installed_app_info)) : false
},
sortedApps() {
// if extended happ releases are not yet fetched from the DevHub to include potential
Expand Down Expand Up @@ -634,7 +634,8 @@ export default defineComponent({
this.installedApps.map(async (app) => {
// Check if DevHub is installed and if so store info about it locally
if (app.webAppInfo.installed_app_info.installed_app_id === DEVHUB_APP_ID) {
this.devHubAppInfo = app
this.devHubAppInfo = app;
this.showAdvancedSettings = true;
}
// Store app store for later use
Expand Down

0 comments on commit eba3c03

Please sign in to comment.