Skip to content

replaced chain with direct function call for lodash compatibility#25

Open
CallidusAsinus wants to merge 2 commits intonervetattoo:masterfrom
CallidusAsinus:master
Open

replaced chain with direct function call for lodash compatibility#25
CallidusAsinus wants to merge 2 commits intonervetattoo:masterfrom
CallidusAsinus:master

Conversation

@CallidusAsinus
Copy link
Copy Markdown

This is my second attempt at a pull request- apologies if it's done incorrectly, I've never made a pull request before.

I was attempting to run this script in a project using lodash in place of underscore, and it was failing due to the differing syntax between chained function calls. lodash expects you to invoke .value at the end of a chain in which nothing is returned.

My solution was to replace the chain with a direct invocation of _.each because the chaining appeared to be unimportant.

@chkpnt
Copy link
Copy Markdown

chkpnt commented Oct 27, 2020

This change is also needed if underscore is used as a ES6 module:

grafik

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.

2 participants