mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-11-12 08:41:34 +00:00
fix(kuzu): remove duplicate ftsLoaded declaration that broke typecheck
The module-level `let ftsLoaded` was declared twice (line 19 and 679), causing TS2451. Removed the duplicate and cleaned up redundant assignments in loadFTSExtension. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a8b3c6b23f
commit
5c3a32d0c6
1 changed files with 1 additions and 5 deletions
|
|
@ -674,22 +674,18 @@ export const getEmbeddingTableName = (): string => EMBEDDING_TABLE_NAME;
|
|||
|
||||
/**
|
||||
* Load the FTS extension (required before using FTS functions).
|
||||
* Safe to call multiple times — tracks loaded state.
|
||||
* Safe to call multiple times — tracks loaded state via module-level ftsLoaded.
|
||||
*/
|
||||
let ftsLoaded = false;
|
||||
export const loadFTSExtension = async (): Promise<void> => {
|
||||
if (ftsLoaded) return;
|
||||
if (!conn) {
|
||||
throw new Error('KuzuDB not initialized. Call initKuzu first.');
|
||||
}
|
||||
if (ftsLoaded) return;
|
||||
try {
|
||||
await conn.query('INSTALL fts');
|
||||
await conn.query('LOAD EXTENSION fts');
|
||||
ftsLoaded = true;
|
||||
} catch {
|
||||
// Extension may already be loaded
|
||||
ftsLoaded = true;
|
||||
}
|
||||
ftsLoaded = true;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue