diff --git a/server/api/objects/[uuid]/index.ts b/server/api/objects/[uuid]/index.ts index 46580aec..c9dc711c 100644 --- a/server/api/objects/[uuid]/index.ts +++ b/server/api/objects/[uuid]/index.ts @@ -45,9 +45,9 @@ export default apiRoute(async (req, matchedRoute) => { apiObject = foundObject ? likeToLysand(foundObject) : null; } - if (!foundObject) { + if (!foundObject || !apiObject) { return errorResponse("Object not found", 404); } - return jsonResponse(foundObject); + return jsonResponse(apiObject); });