Skip to content

Commit

Permalink
Merge branch 'stream-handling' of https://github.com/exhibitionist-di…
Browse files Browse the repository at this point in the history
…gital/ultra into stream-handling
  • Loading branch information
mashaal committed Mar 4, 2022
2 parents 493eb15 + c4f5bc2 commit 1a208b6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { BaseLocationHook, Router } from "wouter";
import { HelmetProvider } from "react-helmet";
import app from "app";
import { isDev } from "./env.ts";

import type { Navigate, RenderOptions } from "./types.ts";

// FIXME: these react types are wrong now
Expand Down Expand Up @@ -150,7 +149,6 @@ export default render;

const encodeStream = (readable: ReadableStream<string | Uint8Array>) =>
new ReadableStream({
//@ts-ignore undefined
start(controller) {
return (async () => {
const encoder = new TextEncoder();
Expand All @@ -165,7 +163,7 @@ const encodeStream = (readable: ReadableStream<string | Uint8Array>) =>
} else if (read.value instanceof Uint8Array) {
controller.enqueue(read.value);
} else {
return null;
return undefined;
}
}
} finally {
Expand Down

0 comments on commit 1a208b6

Please sign in to comment.