mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-07-01 13:33:15 +00:00
Fix compliments module bringing mirror to a halt (#3402)
... when no compliments are to be displayed. We shouldnt even try to randomize when the array has no elements... Fixes #3385
This commit is contained in:
parent
52cfbacd4d
commit
57549fa19c
@ -40,11 +40,12 @@ _This release is scheduled to be released on 2024-04-01._
|
||||
- Ignore all custom css files (#3359)
|
||||
- [newsfeed] Fix newsfeed stall issue introduced by #3336 (#3361)
|
||||
- Changed `log.debug` to `log.log` in `app.js` where logLevel is not set because config is not loaded at this time (#3353)
|
||||
- [calandar] deny fetch interval < 60000 and set 60000 in this case (prevent fetch loop failed) (#3382)
|
||||
- [calendar] deny fetch interval < 60000 and set 60000 in this case (prevent fetch loop failed) (#3382)
|
||||
- added message in case where config.js is missing the module.export line PR #3383
|
||||
- Fixed an issue where recurring events could extend past their recurrence end date (#3393)
|
||||
- Don't display any `npm WARN <....>` on install (#3399)
|
||||
- Fixed move suncalc dependency to production from dev, as it is used by clock module
|
||||
- [compliments] Fix mirror not responding anymore when no compliments are to be shown (#3385)
|
||||
|
||||
### Deleted
|
||||
|
||||
@ -94,7 +95,7 @@ This release also marks the latest release by Michael Teeuw. For more info, plea
|
||||
- Fix #3256 filter out bad results from rrule.between
|
||||
- Fix calendar events sometimes not respecting deleted events (#3250)
|
||||
- Fix electron loadurl locally on Windows when address "0.0.0.0" (#2550)
|
||||
- Fix updatanotification (update_helper.js): catch error if reponse is not an JSON format (check PM2)
|
||||
- Fix updatanotification (update_helper.js): catch error if response is not an JSON format (check PM2)
|
||||
- Fix missing typeof in calendar module
|
||||
- Fix style issues after prettier update
|
||||
- Fix calendar test (#3291) by moving "Exdate check" from e2e to electron to run on a Thursday
|
||||
@ -169,8 +170,8 @@ Special thanks to @khassel, @rejas and @sdetweil for taking over most (if not al
|
||||
- Added tests for serveronly
|
||||
- Set Timezone `Europe/Berlin` in unit tests (needed for new formatTime tests)
|
||||
- Added no-param-reassign eslint rule and fix warnings
|
||||
- updatenotification: Added `sendUpdatesNotifications` feature. Broadcast update with `UPDATES` notification to other modules
|
||||
- updatenotification: allow force scanning with `SCAN_UPDATES` notification from other modules
|
||||
- [updatenotification] Added `sendUpdatesNotifications` feature. Broadcast update with `UPDATES` notification to other modules
|
||||
- [updatenotification] Allow force scanning with `SCAN_UPDATES` notification from other modules
|
||||
- Added per-calendar fetchInterval
|
||||
|
||||
### Removed
|
||||
|
@ -50,7 +50,7 @@ Module.register("compliments", {
|
||||
* @returns {number} a random index of given array
|
||||
*/
|
||||
randomIndex (compliments) {
|
||||
if (compliments.length === 1) {
|
||||
if (compliments.length <= 1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user