From 147d103cfb4bae49b38535cc5ea5d4f061435704 Mon Sep 17 00:00:00 2001 From: Grace Date: Wed, 25 Aug 2021 23:42:48 -0700 Subject: [PATCH] handle exception caused by invalid query id --- superset-frontend/src/SqlLab/reducers/sqlLab.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/SqlLab/reducers/sqlLab.js b/superset-frontend/src/SqlLab/reducers/sqlLab.js index 893042a2356fc..68de3ebd66d8c 100644 --- a/superset-frontend/src/SqlLab/reducers/sqlLab.js +++ b/superset-frontend/src/SqlLab/reducers/sqlLab.js @@ -520,7 +520,7 @@ export default function sqlLabReducer(state = {}, action) { if (changedQuery.changedOn > queriesLastUpdate) { queriesLastUpdate = changedQuery.changedOn; } - const prevState = state.queries[id].state; + const prevState = state.queries[id]?.state; const currentState = changedQuery.state; newQueries[id] = { ...state.queries[id],