aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/notifications.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-08-24 02:48:46 +0800
committerDan Finlay <dan@danfinlay.com>2016-08-24 02:48:46 +0800
commitb3887ffd0a33096ef63fd4bbba9b5ff559775b3e (patch)
treec075901e362135228c3a884a4111a7fe034a1cdf /app/scripts/lib/notifications.js
parent983f3938daf7e8f718faed94b0b76054182719a3 (diff)
downloadtangerine-wallet-browser-b3887ffd0a33096ef63fd4bbba9b5ff559775b3e.tar
tangerine-wallet-browser-b3887ffd0a33096ef63fd4bbba9b5ff559775b3e.tar.gz
tangerine-wallet-browser-b3887ffd0a33096ef63fd4bbba9b5ff559775b3e.tar.bz2
tangerine-wallet-browser-b3887ffd0a33096ef63fd4bbba9b5ff559775b3e.tar.lz
tangerine-wallet-browser-b3887ffd0a33096ef63fd4bbba9b5ff559775b3e.tar.xz
tangerine-wallet-browser-b3887ffd0a33096ef63fd4bbba9b5ff559775b3e.tar.zst
tangerine-wallet-browser-b3887ffd0a33096ef63fd4bbba9b5ff559775b3e.zip
Skip popup dismissal in tests
Diffstat (limited to 'app/scripts/lib/notifications.js')
-rw-r--r--app/scripts/lib/notifications.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/scripts/lib/notifications.js b/app/scripts/lib/notifications.js
index cf4e1c216..c8ecad805 100644
--- a/app/scripts/lib/notifications.js
+++ b/app/scripts/lib/notifications.js
@@ -24,6 +24,12 @@ function showNotification() {
}
function getPopup(cb) {
+
+ // Ignore in test environment
+ if (!extension.windows) {
+ return cb(null)
+ }
+
extension.windows.getAll({}, (windows) => {
let popup = windows.find((win) => {
return win.type === 'popup'