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

 ##########
 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:
   for brand new sql lab (no any query before, or user clears localStorage), 
the latestQuery object will be null. To fix this, i think 0 should be any 
string like '' or 'none' ?

----------------------------------------------------------------
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