From 81f0e0cc9381e3822c56b3facfa2c6affeafc2e0 Mon Sep 17 00:00:00 2001 From: Luiz Ferraz Date: Sun, 18 Aug 2024 22:54:23 -0300 Subject: [PATCH] fix: Yield buffer --- packages/request-state/src/runtime/middleware.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/request-state/src/runtime/middleware.ts b/packages/request-state/src/runtime/middleware.ts index f7efd142..d53fc7c2 100644 --- a/packages/request-state/src/runtime/middleware.ts +++ b/packages/request-state/src/runtime/middleware.ts @@ -24,7 +24,10 @@ export const onRequest = defineMiddleware(async (_, next) => { const state = getState(); if (state) { - yield ``; + yield Buffer.from( + ``, + 'utf-8' + ); } }