Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Commit

Permalink
Run correct query when navigating to query by URL (#2030)
Browse files Browse the repository at this point in the history
Fixes a bug in which the default query would run rather than the query
displayed in the editor unless that query was manually edited after the
page loaded.

Fixes #2028
  • Loading branch information
zwass committed Apr 25, 2019
1 parent ad12ee4 commit 9ef377a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/pages/queries/QueryPage/QueryPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ export class QueryPage extends Component {
this.resetCampaignAndTargets();
}

if (nextProps.query) {
this.setState({ queryText: nextProps.query.query });
}

if (!isEqual(selectedHosts, this.props.selectedHosts)) {
helpers.selectHosts(dispatch, {
hosts: selectedHosts,
Expand Down

0 comments on commit 9ef377a

Please sign in to comment.