mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Slice the list of all events to honor config.maximumEntries
Scenario: * Specify more than one calendar in `config.calendars` * Specify a maximum number of entries in `config.maximumEntries` Result: The module will show as many as maximumEntries for EACH calendar Expected: The module shall not show more than a total of maximumEntries, regardless of how many calendars I specify Fixes #1043
This commit is contained in:
parent
bad7316b80
commit
2d03ff63cf
@ -13,6 +13,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
### Updated
|
### Updated
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Fixed issue with calendar module showing more than `maximumEntries` allows
|
||||||
|
|
||||||
## [2.1.3] - 2017-10-01
|
## [2.1.3] - 2017-10-01
|
||||||
|
|
||||||
**Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`
|
**Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`
|
||||||
|
@ -356,7 +356,7 @@ Module.register("calendar", {
|
|||||||
return a.startDate - b.startDate;
|
return a.startDate - b.startDate;
|
||||||
});
|
});
|
||||||
|
|
||||||
return events;
|
return events.slice(0, this.config.maximumEntries);
|
||||||
},
|
},
|
||||||
|
|
||||||
/* createEventList(url)
|
/* createEventList(url)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user