From 944dd760ca2103e203c1a2c6d50afaef9f875b7e Mon Sep 17 00:00:00 2001 From: Chris Coutinho Date: Thu, 20 Nov 2025 14:18:02 +0100 Subject: [PATCH] fix: Return empty array instead of null for query_coords when no results MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- nextcloud_mcp_server/auth/viz_routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextcloud_mcp_server/auth/viz_routes.py b/nextcloud_mcp_server/auth/viz_routes.py index 56edf48..20ae445 100644 --- a/nextcloud_mcp_server/auth/viz_routes.py +++ b/nextcloud_mcp_server/auth/viz_routes.py @@ -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", } )