Protect again no metadata being passed (#644)
If using Astro <= 0.17.0 there is no `metadata` being passed. Even though no one should be using that version with this, adding some extra protection just in case.
This commit is contained in:
parent
e70d9508d9
commit
44a69f7dcb
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ function check(Component, props, children) {
|
|||
function renderToStaticMarkup(Component, props, children, metadata) {
|
||||
const vnode = h(Component, { ...props, children: h(StaticHtml, { value: children }), innerHTML: children });
|
||||
let html;
|
||||
if (metadata.hydrate) {
|
||||
if(metadata && metadata.hydrate) {
|
||||
html = renderToString(vnode);
|
||||
} else {
|
||||
html = reactRenderToStaticMarkup(vnode);
|
||||
|
|
Loading…
Reference in a new issue