fix: Fix db manager null access when closing it (#7487)

* fix null access

* inspect
This commit is contained in:
Diego Imbert
2026-01-05 13:08:48 +01:00
committed by GitHub
parent c5f9ea7a84
commit ffd45af262

View File

@@ -24,7 +24,7 @@
import type { SelectedTable } from './DBManager.svelte'
interface Props {
input: DbInput
input?: DbInput
showRepl?: boolean
hasReplResult?: boolean
isRefreshing?: boolean
@@ -52,7 +52,7 @@
disabledTables = []
}: Props = $props()
let dbSchema: DBSchema | undefined = $derived($dbSchemas[getDbSchemasPath(input)])
let dbSchema: DBSchema | undefined = $derived(input && $dbSchemas[getDbSchemasPath(input)])
function getDbSchemasPath(input: DbInput): string {
switch (input.type) {