diff options
Skip popup dismissal in tests
Diffstat (limited to 'app/scripts/lib/notifications.js')
-rw-r--r-- | app/scripts/lib/notifications.js | 6 |
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' |