Skip to content

Adding compatibility fix for lodash and underscore#279

Open
connorjburton wants to merge 1 commit intotlovett1:masterfrom
connorjburton:cjb-underscore-lodash-compat
Open

Adding compatibility fix for lodash and underscore#279
connorjburton wants to merge 1 commit intotlovett1:masterfrom
connorjburton:cjb-underscore-lodash-compat

Conversation

@connorjburton
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant