fix: add null guards for getChromaSync() when Chroma is disabled (#1336)
When CLAUDE_MEM_CHROMA_ENABLED=false, getChromaSync() returns null. Two call sites were missing null guards, causing "null is not an object" errors on every UserPromptSubmit / session init. Fixes #1294 Vibe-coded by Ousama Ben Younes Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -356,7 +356,7 @@ export class SessionRoutes extends BaseRouteHandler {
|
||||
// Sync user prompt to Chroma
|
||||
const chromaStart = Date.now();
|
||||
const promptText = latestPrompt.prompt_text;
|
||||
this.dbManager.getChromaSync().syncUserPrompt(
|
||||
this.dbManager.getChromaSync()?.syncUserPrompt(
|
||||
latestPrompt.id,
|
||||
latestPrompt.memory_session_id,
|
||||
latestPrompt.project,
|
||||
|
||||
Reference in New Issue
Block a user