Closed k1sul1 closed 7 years ago
Hmm, I noticed that I had the condition wrong 5 seconds after submitting the PR, so I added !
to it and force pushed so no one would notice.
Apparently [].map()
returns undefined if you never return (which is what happened). Adding .filter(Boolean)
to the chain should work.
script is still not initialising the form. the script is included on the page but submit falls back to a GET request
I'm not really following the logic of your dependency loader. It seems to only initalize if all dependencies are loaded via polyfills.
Shouldn't you increment dependencies_loaded in the else block here? https://github.com/anttiviljami/wp-libre-form/pull/76/files#diff-8554cc24257276c75d5d599331aa60b2R126
This PR is a mess :D I took most of the code that I wrote back in January for #48 and changed it a "bit". Back then dependencies
was empty if you didn't need any dependencies, now it has two values and dependencies_loaded
is obviously broken.
I'll clean this branch up and submit another.
I'm getting this error when using this branch. The form doesn't submit properly either.