Browse Source

chore: add comment for `undefined` check

Gerald 8 years ago
parent
commit
0fa1fdcf82
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/public/mylib/browser.js

+ 3 - 0
src/public/mylib/browser.js

@@ -59,6 +59,9 @@
               });
               return true;
             } else if (typeof result !== 'undefined') {
+              // In some browsers (e.g Chrome 56, Vivaldi), the listener in
+              // popup pages are not properly cleared after closed.
+              // They may send `undefined` before the real response is sent.
               sendResponse({data: result});
             }
           };