1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-02 22:49:09 +02:00

Electron: Fixes #476 (maybe): Trying to fix notification flood. Added more log statements in case something goes wrong.

This commit is contained in:
Laurent Cozic
2018-12-08 00:42:29 +01:00
parent 8e601e80df
commit 71098102c5
3 changed files with 70 additions and 56 deletions

View File

@@ -28,6 +28,10 @@ class AlarmServiceDriverNode {
const interval = notification.date.getTime() - now;
if (interval < 0) return;
if (isNaN(interval)) {
throw new Error('Trying to create a notification from an invalid object: ' + JSON.stringify(notification));
}
const timeoutId = setTimeout(() => {
const o = {
appName: this.appName_,