From 53fe09c7ec136fc8835e4fc22966c8e4485d8c42 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Sun, 31 Dec 2023 16:46:55 +0100 Subject: [PATCH] fix: only check initableServerComponents for init server check (#1725) Signed-off-by: Stefan Dej --- src/plugins/webSocketClient.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/plugins/webSocketClient.ts b/src/plugins/webSocketClient.ts index ec5a34f84..2fdb3e0ad 100644 --- a/src/plugins/webSocketClient.ts +++ b/src/plugins/webSocketClient.ts @@ -1,6 +1,7 @@ import { Store } from 'vuex' import _Vue from 'vue' import { RootState } from '@/store/types' +import { initableServerComponents } from '@/store/variables' export class WebSocketClient { url = '' @@ -67,7 +68,13 @@ export class WebSocketClient { } if (wait?.id) { - if (wait.action?.startsWith('server/')) { + const modulename = wait.action?.split('/')[1] ?? null + + if ( + modulename && + wait.action?.startsWith('server/') && + initableServerComponents.includes(modulename) + ) { const component = wait.action.replace('server/', '').split('/')[0] window.console.error(`init server component ${component} failed`) this.store?.dispatch('server/addFailedInitComponent', component)