Remove additional newlines added to HTML (#1908)

* Remove additional newlines added to HTML

* keep template newlines
This commit is contained in:
Jonathan Neal 2021-11-19 12:43:14 -05:00 committed by GitHub
parent bf1c1b72cf
commit ea2fc06ddf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,7 @@ export type { Metadata } from './metadata';
async function _render(child: any): Promise<any> {
child = await child;
if (Array.isArray(child)) {
return (await Promise.all(child.map((value) => _render(value)))).join('\n');
return (await Promise.all(child.map((value) => _render(value)))).join('');
} else if (typeof child === 'function') {
// Special: If a child is a function, call it automatically.
// This lets you do {() => ...} without the extra boilerplate