mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 04:45:17 +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:
@@ -356,7 +356,7 @@ Module.register("calendar", {
|
||||
return a.startDate - b.startDate;
|
||||
});
|
||||
|
||||
return events;
|
||||
return events.slice(0, this.config.maximumEntries);
|
||||
},
|
||||
|
||||
/* createEventList(url)
|
||||
|
Reference in New Issue
Block a user