mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
fix(sqllab): run previous state query (#29230)
This commit is contained in:
@@ -134,11 +134,12 @@ export const convertQueryToClient = fieldConverter(queryClientMapping);
|
||||
|
||||
export function getUpToDateQuery(rootState, queryEditor, key) {
|
||||
const {
|
||||
sqlLab: { unsavedQueryEditor },
|
||||
sqlLab: { unsavedQueryEditor, queryEditors },
|
||||
} = rootState;
|
||||
const id = key ?? queryEditor.id;
|
||||
return {
|
||||
...queryEditor,
|
||||
id,
|
||||
...queryEditors.find(qe => qe.id === id),
|
||||
...(id === unsavedQueryEditor.id && unsavedQueryEditor),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user