refactored Models/Newsletter::getStatistics method to avoid duplication

- replaced "TO REFACTOR" with more conventional "TODO"
This commit is contained in:
Jonathan Labreuille
2016-07-19 15:34:14 +02:00
parent 0706450f9a
commit 12c036dbef
2 changed files with 35 additions and 55 deletions

View File

@@ -351,8 +351,9 @@ const Listing = React.createClass({
getParams: function() {
// get all route parameters (without the "splat")
let params = _.omit(this.props.params, 'splat');
// TO REFACTOR:
// TODO:
// find a way to set the "type" in the routes definition
// so that it appears in `this.props.params`
if (this.props.type) {
params.type = this.props.type;
}