eschutho commented on a change in pull request #15852:
URL: https://github.com/apache/superset/pull/15852#discussion_r675831910
##########
File path: superset-frontend/src/dashboard/components/Header/index.jsx
##########
@@ -376,11 +377,27 @@ class Header extends React.PureComponent {
this.setState({ showingReportModal: false });
}
- handleReportClick() {
+ reportModal() {
const attachedReportExists = this.props.report?.count > 0;
- if (!attachedReportExists) {
- this.showReportModal();
- }
+ return !attachedReportExists ? (
Review comment:
can you flip the return logic so that you can lead with the positive
statement rather than negative? Just for ease of readability.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]