Skip to content

Commit

Permalink
Stop only running queries
Browse files Browse the repository at this point in the history
  • Loading branch information
koszti committed Jul 9, 2021
1 parent 0f91637 commit 54da5e4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions superset-frontend/src/SqlLab/components/SqlEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,10 @@ class SqlEditor extends React.PureComponent {
}

onBeforeUnload(event) {
event.preventDefault();
this.stopQuery();
if (this.props.latestQuery?.state === 'running') {
event.preventDefault();
this.stopQuery();
}
}

onSqlChanged(sql) {
Expand Down

0 comments on commit 54da5e4

Please sign in to comment.