We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9102ee commit b6cc47eCopy full SHA for b6cc47e
apps/src/metabase/helpers/metabaseStateAPI.ts
@@ -64,7 +64,7 @@ export async function getSelectedDbId(): Promise<number | undefined> {
64
dbId = await getMetabaseState('qb.card.dataset_query.database');
65
if (!dbId) {
66
const entity_dbs = await getMetabaseState('entities.databases') as object;
67
- const all_dbs = Object.entries(entity_dbs)
+ const all_dbs = isEmpty(entity_dbs) ? [] : Object.entries(entity_dbs)
68
if (all_dbs.length === 1) {
69
dbId = all_dbs[0][1].id;
70
}
0 commit comments