Skip to content

Commit ad19bcd

Browse files
author
Jason Barry
committed
No need to JSON.stringify when using Response.json()
1 parent 349e4f8 commit ad19bcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netlify/functions/blob.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default async (req: Request) => {
66
if (req.method === "GET") {
77
const todos = await store.get("todos", { type: "json" });
88
// @ts-expect-error `new` operator not needed for Response.json()
9-
return Response.json(todos || JSON.stringify([]), { status: 200 });
9+
return Response.json(todos || [], { status: 200 });
1010
}
1111

1212
if (req.method === "PUT") {

0 commit comments

Comments
 (0)