From c346510cdf0257fef12e0f3ef5b24372fe47c196 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Tue, 24 Aug 2021 22:47:16 +0200 Subject: [PATCH] bugfix: available_services types and getter in topbar Signed-off-by: Stefan Dej --- src/components/TheTopCornerMenu.vue | 2 +- src/store/server/types.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/TheTopCornerMenu.vue b/src/components/TheTopCornerMenu.vue index 0f97214a..79cd1dd7 100644 --- a/src/components/TheTopCornerMenu.vue +++ b/src/components/TheTopCornerMenu.vue @@ -59,7 +59,7 @@ export default class TheTopCornerMenu extends Mixins(BaseMixin) { showMenu = false get services() { - const services = this.$store.state.server.system_info.available_services?.filter((name: string) => name !== 'klipper_mcu') ?? [] + const services = this.$store.state.server.system_info?.available_services?.filter((name: string) => name !== 'klipper_mcu') ?? [] services.sort() return services } diff --git a/src/store/server/types.ts b/src/store/server/types.ts index b6a2bb80..a56aa5ca 100644 --- a/src/store/server/types.ts +++ b/src/store/server/types.ts @@ -16,7 +16,7 @@ export interface ServerState { [key: string]: any }, system_info: { - available_services: { [key: number]: string }[] + available_services: string[] cpu_info: ServerStateCpuInfo distribution: ServerStateDistribution sd_info: ServerStateSdInfo