Skip to content

Commit a68592d

Browse files
Fix catalog route rendering (#1376)
1 parent b99f51f commit a68592d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/site-server/src/catalog/routes/catalog/catalog-route.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import Router from '@koa/router';
88
import {renderPage} from '../../../templates/base.js';
99
import {DefaultContext, DefaultState, ParameterizedContext} from 'koa';
10+
import {Readable} from 'stream';
1011

1112
export const handleCatalogRoute = async (
1213
context: ParameterizedContext<
@@ -15,16 +16,16 @@ export const handleCatalogRoute = async (
1516
unknown
1617
>
1718
) => {
18-
context.body = renderPage({
19+
context.body = Readable.from(renderPage({
1920
title: `Web Components Catalog`,
2021
scripts: [
21-
'./js/catalog.js'
22+
'/js/catalog.js'
2223
],
2324
content: `
2425
<h1>Catalog</h1>
2526
<wco-catalog-search></wco-catalog-search>
2627
`,
27-
});
28+
}));
2829
context.type = 'html';
2930
context.status = 200;
3031
};

0 commit comments

Comments
 (0)