0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

fix: stub formState to avoid hydration error

This commit is contained in:
bholmesdev 2024-05-16 13:59:35 -04:00
parent 3f8a75f93c
commit dcb64228bb

View file

@ -69,6 +69,7 @@ export default (element) =>
if (!element.hasAttribute('ssr')) return; if (!element.hasAttribute('ssr')) return;
const renderOptions = { const renderOptions = {
identifierPrefix: element.getAttribute('prefix'), identifierPrefix: element.getAttribute('prefix'),
formState: [],
}; };
for (const [key, value] of Object.entries(slotted)) { for (const [key, value] of Object.entries(slotted)) {
props[key] = createElement(StaticHtml, { value, name: key }); props[key] = createElement(StaticHtml, { value, name: key });