aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/notification-manager.js
diff options
context:
space:
mode:
authorThomas <thomas.b.huang@gmail.com>2018-07-11 02:34:00 +0800
committerThomas <thomas.b.huang@gmail.com>2018-07-11 02:34:00 +0800
commit5188b727d43e91087449818dee69942c382b6d89 (patch)
tree4a89be50f09d24bc7e6ed3daf83b660f5e87380e /app/scripts/lib/notification-manager.js
parentdd18684a5d682f48528f278284619983f13bf82f (diff)
parentf6de948e42ae633d40aef72595a01caa622a280d (diff)
downloadtangerine-wallet-browser-5188b727d43e91087449818dee69942c382b6d89.tar.gz
tangerine-wallet-browser-5188b727d43e91087449818dee69942c382b6d89.tar.zst
tangerine-wallet-browser-5188b727d43e91087449818dee69942c382b6d89.zip
Merge branch 'develop' into removeNonceTrackerFunction
Diffstat (limited to 'app/scripts/lib/notification-manager.js')
-rw-r--r--app/scripts/lib/notification-manager.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/scripts/lib/notification-manager.js b/app/scripts/lib/notification-manager.js
index 6b88a7a99..969a9459a 100644
--- a/app/scripts/lib/notification-manager.js
+++ b/app/scripts/lib/notification-manager.js
@@ -26,15 +26,15 @@ class NotificationManager {
// bring focus to existing chrome popup
extension.windows.update(popup.id, { focused: true })
} else {
+ const cb = (currentPopup) => { this._popupId = currentPopup.id }
// create new notification popup
- extension.windows.create({
+ const creation = extension.windows.create({
url: 'notification.html',
type: 'popup',
width,
height,
- }).then((currentPopup) => {
- this._popupId = currentPopup.id
- })
+ }, cb)
+ creation && creation.then && creation.then(cb)
}
})
}