Skip to content

Commit

Permalink
fix: only check initableServerComponents for init server check (#1725)
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Dej <[email protected]>
  • Loading branch information
meteyou authored Dec 31, 2023
1 parent d8ebc86 commit 53fe09c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/plugins/webSocketClient.ts
Original file line number Diff line number Diff line change
@@ -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 = ''
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 53fe09c

Please sign in to comment.