File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
src/renderer/components/CodeEditor Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -66,22 +66,13 @@ function handleEnumAutoComplete(
6666
6767 // Let search for identifer
6868 const identifier = searchForIdentifier ( context , currentNode . prevSibling ) ;
69- console . log ( identifier ) ;
70-
7169 if ( ! identifier ) return null ;
7270
7371 const [ table , column ] = identifier . replaceAll ( '`' , '' ) . split ( '.' ) ;
7472 if ( ! table ) return null ;
7573
7674 const enumValues = enumSchema . find ( ( tempEnum ) => {
77- if ( column ) {
78- // normally column will be enum
79- return tempEnum . column === column ;
80- } else {
81- // when column is a keyword, the node will be counted as 2
82- // so there will be no column, the enum will be in table variable instead
83- return tempEnum . column === table ;
84- }
75+ return tempEnum . column === column && table === tempEnum . table ;
8576 } ) ?. values ;
8677
8778 if ( ! enumValues ) return null ;
You can’t perform that action at this time.
0 commit comments