We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e55017 commit 7718ad1Copy full SHA for 7718ad1
blocks/form/form.js
@@ -89,7 +89,7 @@ export default async function decorate(block) {
89
const links = [...block.querySelectorAll('a')].map((a) => a.href);
90
const formLink = links.find((link) => link.startsWith(window.location.origin) && link.endsWith('.json'));
91
const submitLink = links.find((link) => link !== formLink);
92
- if (!formLink) return;
+ if (!formLink || !submitLink) return;
93
94
const form = await createForm(formLink, submitLink);
95
block.replaceChildren(form);
0 commit comments