Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Add guard in SQlEditorStore

Joshen Lim25cdb2dc2d94
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())
}
}