backbone.touch icon indicating copy to clipboard operation
backbone.touch copied to clipboard

replaced chain with direct function call for lodash compatibility

Open CallidusAsinus opened this issue 10 years ago • 1 comments

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.

CallidusAsinus avatar Oct 30 '15 19:10 CallidusAsinus

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

grafik

chkpnt avatar Oct 27 '20 16:10 chkpnt