custom-contact-forms
custom-contact-forms copied to clipboard
Adding compatibility fix for lodash and underscore
There is an issue when underscore
and lodash
are in the same global scope, when form.min.js
first loads _
is defined as underscore
. However, when the rest of the page loads (and lodash), it will overwrite _
to lodash
, which means when you click the submit button you get an error to do with the _.each(arg, callable, context)
, as underscore
has the third context
parameter, yet lodash
doesn't.
As you can see, that is an issue! I have used _.noConflict()
to ensure what we use at the start of form.js
we use throughout the file.
Hi @tlovett1 - have you managed to look at this yet? This is a form breaking issue and should be pretty easy to merge.