From 9c08bc0ffc51f5fa779ff90ca061668b7b332ad7 Mon Sep 17 00:00:00 2001 From: Phillip Kelley-Dotson Date: Tue, 8 Feb 2022 09:22:20 -0800 Subject: [PATCH] fix: change database database selector (#18609) * fix: change database selector * fix lint --- superset-frontend/src/SqlLab/actions/sqlLab.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/SqlLab/actions/sqlLab.js b/superset-frontend/src/SqlLab/actions/sqlLab.js index 9485cfb650ca7..9a2a976e8baf1 100644 --- a/superset-frontend/src/SqlLab/actions/sqlLab.js +++ b/superset-frontend/src/SqlLab/actions/sqlLab.js @@ -787,7 +787,11 @@ export function queryEditorSetSchema(queryEditor, schema) { return sync .then(() => - dispatch({ type: QUERY_EDITOR_SET_SCHEMA, queryEditor, schema }), + dispatch({ + type: QUERY_EDITOR_SET_SCHEMA, + queryEditor: queryEditor || {}, + schema: schema || {}, + }), ) .catch(() => dispatch(