diff --git a/www/plugins/es/js/services/notification-services.js b/www/plugins/es/js/services/notification-services.js index 8927b255ba33a8a2316acbd4f57507210d464230..b49c94980ce9f2c82cda98af093c670b69f326fe 100644 --- a/www/plugins/es/js/services/notification-services.js +++ b/www/plugins/es/js/services/notification-services.js @@ -169,7 +169,12 @@ angular.module('cesium.es.notification.services', ['cesium.services', 'cesium.es // Mark a notification as read function markNotificationAsRead(notification) { - if (notification.read) return; // avoid multi call + if (notification.read || !notification.id) return; // avoid multi call + // Should never append (fix in Duniter4j issue #12) + if (!notification.id) { + console.error('[ES] [notification] Could not mark as read: no \'id\' found!', notification); + return; + } notification.read = true; CryptoUtils.sign(notification.hash, csWallet.data.keypair) .then(function(signature){