From 068ff54eff7cf48830107336841a6dfd0138ce02 Mon Sep 17 00:00:00 2001 From: Colin Regourd Date: Wed, 22 May 2024 17:09:57 +0200 Subject: [PATCH] Fix build with Buffer --- apps/docs/pages/docs/code-snippets.mdx | 2 +- apps/example/app/api/users/export/route.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/docs/pages/docs/code-snippets.mdx b/apps/docs/pages/docs/code-snippets.mdx index 3cefed01..12f06fe6 100644 --- a/apps/docs/pages/docs/code-snippets.mdx +++ b/apps/docs/pages/docs/code-snippets.mdx @@ -61,7 +61,7 @@ export async function GET() { }) .join(""); - controller.enqueue(csv); + controller.enqueue(Buffer.from(csv)); skip += batchSize; } while (users.length === batchSize); diff --git a/apps/example/app/api/users/export/route.ts b/apps/example/app/api/users/export/route.ts index 8a301279..627e1db0 100644 --- a/apps/example/app/api/users/export/route.ts +++ b/apps/example/app/api/users/export/route.ts @@ -22,7 +22,7 @@ export async function GET() { return `${user.id},${user.name},${user.email},${user.role},${user.birthDate}\n`; }) .join(""); - controller.enqueue(csv); + controller.enqueue(Buffer.from(csv)); skip += batchSize; } while (users.length === batchSize); } catch (error) {