Skip to content

Commit

Permalink
Merge pull request #56 from fewieden/develop
Browse files Browse the repository at this point in the history
v1.3.1
  • Loading branch information
fewieden committed Aug 13, 2022
2 parents 28e9fae + beb354e commit 16332fe
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 14 deletions.
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# MMM-NFL Changelog

## 1.3.1

### Fixed

- [Config option `focus_on` didn't filter match list](https://github.com/fewieden/MMM-NFL/issues/55)

### Removed

- TravisCI integration

## 1.3.0

MagicMirror² version >= 2.15.0 required.
Expand Down
10 changes: 9 additions & 1 deletion MMM-NFL.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,21 @@ Module.register('MMM-NFL', {
return this.config.focus_on.filter(team => !this.findTeamInScores(team));
},

getFilteredScores() {
if (!Array.isArray(this.config.focus_on) || !Array.isArray(this.scores)) {
return this.scores;
}

return this.scores.filter(m => this.config.focus_on.includes(m.homeTeam) || this.config.focus_on.includes(m.awayTeam));
},

getTemplateData() {
return {
states: this.states,
modes: this.mode,
details: this.details,
config: this.config,
scores: this.scores,
scores: this.getFilteredScores(),
focusedTeamsWithByeWeeks: this.getFocusedTeamsWithByeWeeks()
};
},
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mmm-nfl",
"version": "1.3.0",
"version": "1.3.1",
"description": "National Football League Module for MagicMirror2",
"scripts": {
"lint": "eslint . && stylelint **/*.css"
Expand Down

0 comments on commit 16332fe

Please sign in to comment.