Skip to content

Commit

Permalink
fix: add html doctype to the output
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Nov 21, 2020
1 parent ae5cb36 commit a446265
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/React.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ class ReactInstance {
Component: ComponentType<T>,
props?: ComponentPropsWithoutRef<ComponentType<T>>,
): string {
return renderToStaticMarkup(
const html = renderToStaticMarkup(
// @ts-ignore
<AdonisContextProvider value={this.context}>
{/* @ts-ignore */}
<Component {...props} />
</AdonisContextProvider>,
);
return `<!DOCTYPE html>\n${html}`;
}
}

0 comments on commit a446265

Please sign in to comment.