Skip to content

Commit 343c6b8

Browse files
committed
Move the dispose method upwards
1 parent 6e93d3d commit 343c6b8

File tree

1 file changed

+1
-1
lines changed
  • packages/web-console/src/scenes/Editor/Monaco

1 file changed

+1
-1
lines changed

packages/web-console/src/scenes/Editor/Monaco/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,6 @@ const MonacoEditor = () => {
375375

376376
const setCompletionProvider = async () => {
377377
if (editorReady && monacoRef?.current && editorRef?.current) {
378-
schemaCompletionHandle?.dispose()
379378
try {
380379
const response = await quest.query<InformationSchemaColumn>(
381380
"information_schema.columns()",
@@ -404,6 +403,7 @@ const MonacoEditor = () => {
404403
}
405404

406405
useEffect(() => {
406+
schemaCompletionHandle?.dispose()
407407
setCompletionProvider()
408408
}, [tables, monacoRef, editorReady])
409409

0 commit comments

Comments
 (0)