Explorar o código

fire click only when notification was found

Sebastián Katzer %!s(int64=10) %!d(string=hai) anos
pai
achega
12496c31fb
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/windows/LocalNotificationUtil.js

+ 3 - 0
src/windows/LocalNotificationUtil.js

@@ -330,6 +330,9 @@ WinJS.Application.addEventListener('activated', function (args) {
     var id = args.detail.arguments,
         notification = exports.getAll([id])[0];
 
+    if (!notification)
+        return;
+
     exports.clearLocalNotification(id);
     exports.fireEvent('click', notification);
 }, false);