custom-contact-forms icon indicating copy to clipboard operation
custom-contact-forms copied to clipboard

Adding compatibility fix for lodash and underscore

Open connorjburton opened this issue 8 years ago • 1 comments

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.

connorjburton avatar Jun 29 '16 12:06 connorjburton

Hi @tlovett1 - have you managed to look at this yet? This is a form breaking issue and should be pretty easy to merge.

connorjburton avatar Jul 25 '16 08:07 connorjburton