Skip to content

Commit

Permalink
fix: Replace leaky dummy stream
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Jan 9, 2025
1 parent fecaf42 commit 505fc87
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/files/filetree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import { FileIgnoreRules } from './ignore.ts'

const nullFile = {
size: 0,
stream: new ReadableStream(),
stream: new ReadableStream({
start(controller) {
controller.close()
}
}),
text: () => Promise.resolve(''),
readBytes: async (size: number, offset?: number) => new Uint8Array(),
parent: new FileTree('', '/'),
Expand Down

0 comments on commit 505fc87

Please sign in to comment.