mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 17:38:28 +01:00
Fix alarm not being fired sometimes
This commit is contained in:
parent
ac25c9b2b8
commit
6c75d9eb9f
@ -88,7 +88,7 @@ var et2_countdown = /** @class */ (function (_super) {
|
||||
return 0;
|
||||
var alarms = Array.isArray(this.options.alarm) ? this.options.alarm : [this.options.alarm];
|
||||
for (var i = 0; i <= alarms.length; i++) {
|
||||
if (alarms[i] > 0 && alarms[i] == distance / 1000 && typeof this.onAlarm == 'function') {
|
||||
if (alarms[i] > 0 && alarms[i] == Math.floor(distance / 1000) && typeof this.onAlarm == 'function') {
|
||||
this.onAlarm();
|
||||
}
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ export class et2_countdown extends et2_valueWidget {
|
||||
|
||||
for (let i=0;i<=alarms.length;i++)
|
||||
{
|
||||
if (alarms[i] > 0 && alarms[i] == distance/1000 && typeof this.onAlarm == 'function')
|
||||
if (alarms[i] > 0 && alarms[i] == Math.floor(distance/1000) && typeof this.onAlarm == 'function')
|
||||
{
|
||||
this.onAlarm();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user