fix: Return empty array instead of null for query_coords when no results
When vector visualization search returns zero results, the code was returning query_coords: null, which caused JavaScript error "can't access property 0, queryCoords is null" when the frontend tried to access the array. Changed to return empty array [] to match expected type and prevent crash. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -212,7 +212,7 @@ async def vector_visualization_search(request: Request) -> JSONResponse:
|
||||
"success": True,
|
||||
"results": [],
|
||||
"coordinates_3d": [],
|
||||
"query_coords": None,
|
||||
"query_coords": [],
|
||||
"message": "No results found",
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user