Skip to content

Commit fbdbc82

Browse files
authored
chore: add a type cast to run deno publish (#4364)
1 parent 187ece2 commit fbdbc82

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/middleware/etag/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ export const etag = (options?: ETagOptions): MiddlewareHandler => {
9393
if (!generator) {
9494
return
9595
}
96-
const hash = await generateDigest(res.clone().body, generator)
96+
const hash = await generateDigest(
97+
// This type casing avoids the type error for `deno publish`
98+
res.clone().body as ReadableStream<Uint8Array<ArrayBuffer>>,
99+
generator
100+
)
97101
if (hash === null) {
98102
return
99103
}

0 commit comments

Comments
 (0)