Hey everyone! Our team encountered a really weird issue with Underscore.js while switching from Meteor version 2.12 to 2.16.
While on version 2.12 of Meteor, _.where receives an array and returns an array. Here is an example of that from the browser of our production site:
That lines up with Underscore.js’s documentation, so that’s the expected behavior.
Here is the definition of _.where when I look in the browser’s “Sources” tab while on the production site:
When I switch to version 2.16 of Meteor.js and spin up my local environment and go to localhost, I am seeing that _.where receives an array and returns an object. Here is an example of that from the browser while on localhost:
When I go and look in the browser’s “Sources” tab, this is how _.where is being defined. I’ve also included a screenshot of how _.find is being defined since that _.where is using _.find here.
Here are the versions of Underscore that the different Meteor.js version use:
Am I crazy here? Our team was already planning on removing Underscore.js from our codebase just for the sake of simplicity, but in the meantime we are hoping to figure out why this is happening.
Thank you!