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) {