backbone.touch
backbone.touch copied to clipboard
replaced chain with direct function call for lodash compatibility
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.
This change is also needed if underscore is used as a ES6 module:
