瀏覽代碼

fire click only when notification was found

Sebastián Katzer 10 年之前
父節點
當前提交
12496c31fb
共有 1 個文件被更改,包括 3 次插入0 次删除
  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);