Skip to content

Commit

Permalink
fix: Yield buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
Fryuni committed Aug 19, 2024
1 parent 7df2fae commit 81f0e0c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/request-state/src/runtime/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ export const onRequest = defineMiddleware(async (_, next) => {
const state = getState();

if (state) {
yield `<script id="it-astro-state" type="application/json+devalue">${state}</script>`;
yield Buffer.from(
`<script id="it-astro-state" type="application/json+devalue">${state}</script>`,
'utf-8'
);
}
}

Expand Down

0 comments on commit 81f0e0c

Please sign in to comment.