Fix runtime error when no rawText present

pull/10616/head
Andrew Watkins 2017-11-30 15:25:55 -08:00
parent ce8affd6f8
commit f0713fe0cd
1 changed files with 5 additions and 2 deletions

View File

@ -49,9 +49,12 @@ const DatabaseList = React.createClass({
const {querySource: nextSource, query: nextQuery} = this.props
const differentSource = !_.isEqual(prevSource, nextSource)
if (prevQuery.rawText === nextQuery.rawText) {
return
}
const newMetaQuery =
prevQuery.rawText !== nextQuery.rawText &&
nextQuery.rawText.match(/^(create|drop)/i)
nextQuery.rawText && nextQuery.rawText.match(/^(create|drop)/i)
if (differentSource || newMetaQuery) {
setTimeout(this.getDbRp, 100)