Skip to content
Snippets Groups Projects
Unverified Commit 28fd102e authored by Paul Rosenzweig's avatar Paul Rosenzweig Committed by GitHub
Browse files

cancel running queries in situations we missed (#12114)

parent 91588514
No related merge requests found
......@@ -131,6 +131,7 @@ export const POP_STATE = "metabase/qb/POP_STATE";
export const popState = createThunkAction(
POP_STATE,
location => async (dispatch, getState) => {
dispatch(cancelQuery());
const card = getCard(getState());
if (location.state && location.state.card) {
if (!Utils.equals(card, location.state.card)) {
......
......@@ -211,6 +211,7 @@ export default class NativeQueryEditor extends Component {
}
componentWillUnmount() {
this.props.cancelQuery();
document.removeEventListener("keydown", this.handleKeyDown);
}
......@@ -233,6 +234,7 @@ export default class NativeQueryEditor extends Component {
};
runQuery = () => {
this.props.cancelQuery();
const { query, runQuestionQuery } = this.props;
// if any text is selected, just run that
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment