Add guard in SQlEditorStore

This commit is contained in:
Joshen Lim committed 2022-09-12 10:04:15 +08:00
1 parent 7cb722dff0
commit 25cdb2dc2d
1 file changed
+1 -1
@@ -255,7 +255,7 @@ class SqlEditorStore {
async loadKeywords() {
const query = 'select * from pg_get_keywords();'
const response = await this.meta.query(query)
if (!response.error) {
if (response && !response.error) {
this.keywordCache = response.map((x) => x.word.toLocaleLowerCase())
}
}