Skip to content

Commit

Permalink
fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Oct 19, 2023
1 parent fcf08e8 commit 7d26eff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/src/server/app-render/action-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import type { AppRenderContext, GenerateFlight } from './app-render'
function nodeToWebReadableStream(nodeReadable: import('stream').Readable) {
if (process.env.NEXT_RUNTIME !== 'edge') {
const { Readable } = require('stream') as typeof import('stream')
return Readable.toWeb(nodeReadable)
return Readable.toWeb(nodeReadable) as ReadableStream
} else {
throw new Error('Invalid runtime')
}
Expand Down

0 comments on commit 7d26eff

Please sign in to comment.