etr2460 commented on a change in pull request #7691: [SQL Lab] Fix proptypes 
warning
URL: 
https://github.com/apache/incubator-superset/pull/7691#discussion_r293070927
 
 

 ##########
 File path: superset/assets/src/SqlLab/components/SqlEditor.jsx
 ##########
 @@ -308,7 +308,7 @@ class SqlEditor extends React.PureComponent {
         </div>
         <SouthPane
           editorQueries={this.props.editorQueries}
-          latestQueryId={this.props.latestQuery ? this.props.latestQuery.id : 
0}
+          latestQueryId={this.props.latestQuery && this.props.latestQuery.id}
 
 Review comment:
   `null && something_invalid` resolves to null, so I think this is fine. It 
makes more sense for latestQueryId to be `null` if no query exists instead of 
something like empty string (i think)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to