-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Marionette 2.0 - isEmpty doesn't use the collection it is passed #1566
Comments
👍 |
Me either @joshbedo alas need to fix this one |
Just fyi there are tons of methods like this in Marionette. I chose not to change it in v2 because it's potentially breaking, and affects so much of the codebase. We should make a single issue to track all of them. |
I made a quick scan of Marionette (visual studio highlights unused JavaScript variables) and created issues for the ones I saw. There weren't tons, only a handful, but perhaps others using variables but not correctly. |
"Fixing" this method would be breaking if someone is passing random data to the method and all of a sudden we start returning the correct value. Currently the implementation contract and the documentation are out of sync. The fix could be simply to X the argument |
Couldn't something like this potentially be done? That way the old way and correct way both work. I personally don't think anyone should ever pass a collection as an argument.. thats what utility methods are for. If it was
|
+1 to removing the argument. I don't see any benefit to implementing new behavior just because the signature is weird. |
👍 |
@cmaher agreed, nobody uses collection as an argument anyway and if they do they should stop :) |
Related: #930 |
👍 |
The fix for these is to add Documentation around why the argument is there. |
Every time this is called, the CollectionView passes |
yep @cmaher totally! PS not sure if we ever want to actually remove it because it is useful if you are overriding the method |
I think @cmaher's point is that the method will always be called from the collection view itself, so you will have access to |
line 2071
The text was updated successfully, but these errors were encountered: