Don't bail command palette if there's no engineConnection (#6286)
The connection can't be bad if there is not yet `:galaxy-brain:`. But seriously this behavior regressed share links because we would bail from the command palette because the connection wasn't healthy.
This commit is contained in:
@ -10,6 +10,7 @@ import Tooltip from '@src/components/Tooltip'
|
||||
import { useNetworkContext } from '@src/hooks/useNetworkContext'
|
||||
import { EngineConnectionStateType } from '@src/lang/std/engineConnection'
|
||||
import useHotkeyWrapper from '@src/lib/hotkeyWrapper'
|
||||
import { engineCommandManager } from '@src/lib/singletons'
|
||||
import {
|
||||
commandBarActor,
|
||||
useCommandBarState,
|
||||
@ -46,6 +47,7 @@ export const CommandBar = () => {
|
||||
useEffect(() => {
|
||||
if (
|
||||
!commandBarActor.getSnapshot().matches('Closed') &&
|
||||
engineCommandManager.engineConnection &&
|
||||
(immediateState.type === EngineConnectionStateType.Disconnecting ||
|
||||
immediateState.type === EngineConnectionStateType.Disconnected)
|
||||
) {
|
||||
|
Reference in New Issue
Block a user