Skip to content

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

Chore/fix intellisense query (#21702)

Terry Sutton8f9b1367c1a0
diff --git a/apps/studio/components/interfaces/SQLEditor/MonacoEditor.tsx b/apps/studio/components/interfaces/SQLEditor/MonacoEditor.tsx
index 2dde1cb9b66..b6a50b8ad43 100644
--- a/apps/studio/components/interfaces/SQLEditor/MonacoEditor.tsx
+++ b/apps/studio/components/interfaces/SQLEditor/MonacoEditor.tsx
@@ -40,7 +40,7 @@ const MonacoEditor = ({
const [intellisenseEnabled] = useLocalStorageQuery(
LOCAL_STORAGE_KEYS.SQL_EDITOR_INTELLISENSE,
- typeof window !== 'undefined' ? false : true
+ true
)
const snap = useSqlEditorStateSnapshot({ sync: true })
diff --git a/apps/studio/components/interfaces/SQLEditor/UtilityPanel/UtilityActions.tsx b/apps/studio/components/interfaces/SQLEditor/UtilityPanel/UtilityActions.tsx
index 6e65ed72fc5..af7191c8fb2 100644
--- a/apps/studio/components/interfaces/SQLEditor/UtilityPanel/UtilityActions.tsx
+++ b/apps/studio/components/interfaces/SQLEditor/UtilityPanel/UtilityActions.tsx
@@ -49,9 +49,10 @@ const UtilityActions = ({
const os = detectOS()
const project = useSelectedProject()
const showReadReplicasUI = project?.is_read_replicas_enabled
+
const [intellisenseEnabled, setIntellisenseEnabled] = useLocalStorageQuery(
LOCAL_STORAGE_KEYS.SQL_EDITOR_INTELLISENSE,
- typeof window !== 'undefined' ? false : true
+ true
)
return (
diff --git a/apps/studio/pages/project/[ref]/sql/[id].tsx b/apps/studio/pages/project/[ref]/sql/[id].tsx
index 48af796d0b3..eeca39984aa 100644
--- a/apps/studio/pages/project/[ref]/sql/[id].tsx
+++ b/apps/studio/pages/project/[ref]/sql/[id].tsx
@@ -35,7 +35,7 @@ const SqlEditor: NextPageWithLayout = () => {
const [intellisenseEnabled] = useLocalStorageQuery(
LOCAL_STORAGE_KEYS.SQL_EDITOR_INTELLISENSE,
- typeof window !== 'undefined' ? false : true
+ true
)
async function formatPgsql(value: string) {