Allow users to see query string when query returns no data (#3585)

This commit is contained in:
Jeff Niu 2017-10-03 22:32:17 -07:00 committed by Maxime Beauchemin
parent a85968eadb
commit 40fbf1c761

View File

@ -65,7 +65,10 @@ export default class DisplayQueryButton extends React.PureComponent {
});
}
beforeOpen() {
if (['loading', null].indexOf(this.props.chartStatus) >= 0 || !this.props.queryResponse) {
if (
['loading', null].indexOf(this.props.chartStatus) >= 0
|| !this.props.queryResponse || !this.props.queryResponse.query
) {
this.fetchQuery();
} else {
this.setStateFromQueryResponse();