-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shim-array find() doesn't use the same params as the canonical one. #182
Comments
Here's the dependency tree that I had that ended up leading me here:
Even though this is an old version of collections, @Jorenm 's feedback is valid. |
+1. Changing existing standardised behavior of core objects is a very bad idea, particularly if the change is documented as not happening. The documentation states:
As I have the most current version available in NPM (5.0.7, according to my package.json file), I would have assumed that I'd get the version 2 behaviour, but apparently it has been reverted to the behaviour of version 1 for some reason. |
I too have just had several issues due to this library's poorly-named functions – with great power comes great responsibility(!). |
@mattandrews Can you try npm install collections@2.0.3 and tell me if that fix your issue. V3 to v5 was released with legacy shim and find override instead of findValue. |
Duplicate #185 |
Hi, thanks for the update. Unfortunately my issue was with a library several steps upstream from collections, so even if the issue is fixed here I need to get two further projects to update their dependencies (eg. see the explanation here). Since commenting here I migrated my code away from the original tools I was trying to use as the effect this was having on my codebase was unmanageable (eg. uses of |
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find?v=control
Also, shouldn't a shim check if it exists before it replaces it?
This took up maybe 5 hours of debugging till I dug into the right node_module to find its functionality broken because it expected the canonical .find functionality :(
The text was updated successfully, but these errors were encountered: