[SQL Lab] Fix proptypes warning (#7691)

This commit is contained in:
Erik Ritter 2019-06-12 21:54:47 -07:00 committed by Grace Guo
parent 5cf06331fe
commit 2a453e1878
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ const TAB_HEIGHT = 44;
*/ */
const propTypes = { const propTypes = {
editorQueries: PropTypes.array.isRequired, editorQueries: PropTypes.array.isRequired,
latestQueryId: PropTypes.string.isRequired, latestQueryId: PropTypes.string,
dataPreviewQueries: PropTypes.array.isRequired, dataPreviewQueries: PropTypes.array.isRequired,
actions: PropTypes.object.isRequired, actions: PropTypes.object.isRequired,
activeSouthPaneTab: PropTypes.string, activeSouthPaneTab: PropTypes.string,

View File

@ -308,7 +308,7 @@ class SqlEditor extends React.PureComponent {
</div> </div>
<SouthPane <SouthPane
editorQueries={this.props.editorQueries} editorQueries={this.props.editorQueries}
latestQueryId={this.props.latestQuery ? this.props.latestQuery.id : 0} latestQueryId={this.props.latestQuery && this.props.latestQuery.id}
dataPreviewQueries={this.props.dataPreviewQueries} dataPreviewQueries={this.props.dataPreviewQueries}
actions={this.props.actions} actions={this.props.actions}
height={southPaneHeight} height={southPaneHeight}