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
Update todoStorage.js #1593
Update todoStorage.js #1593
Conversation
@githubERIK looks like a few style issues on CI would you mind fixing those up |
Managed to fix those style errors. |
@githubERIK Could you explain why you want to change the code like this? Also, it seems like you have found a loophole in our style guide, because this still looks very foreign compared to other code in that file and elsewhere. :) |
With the master branch code I got "DELETE (my_localhost_URL_ path) 400 (Bad Request)" |
Travis still seems to be complaining here 🐒 |
Indeed. Could somebody explain me, what Travis means by the following output?
|
Pull request #1606 fixed Travis |
}); | ||
for (var i = 0; i < completeTodos.length; i++) { | ||
store.delete(completeTodos[i]); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to have a semicolon here. Kinda surprises me that the linter doesn't check for this? :/
}, function error() { | ||
angular.copy(originalTodos, store.todos); | ||
}); | ||
for (var i = 0; i < completeTodos.length; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just use forEach
? :)
I experimented with the code and Deployd backend (http://deployd.com/). It seemed to me that clearCompleted function worked better with my proposed code.