From 25cdb2dc2d942073efe30d65bd6f79cf50428c01 Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Fri, 9 Sep 2022 14:42:47 +0800 Subject: [PATCH] Add guard in SQlEditorStore --- studio/localStores/sqlEditor/SqlEditorStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/studio/localStores/sqlEditor/SqlEditorStore.js b/studio/localStores/sqlEditor/SqlEditorStore.js index 7b05598377d..6a4ef0349bc 100644 --- a/studio/localStores/sqlEditor/SqlEditorStore.js +++ b/studio/localStores/sqlEditor/SqlEditorStore.js @@ -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()) } }