set an id to the metamask notification popup

This commit is contained in:
vittominacori 2018-06-16 18:51:01 +02:00
parent 299abee666
commit 4c1b526137
1 changed files with 2 additions and 1 deletions

View File

@ -28,6 +28,7 @@ class NotificationManager {
} else {
// create new notification popup
extension.windows.create({
id: 'metamask-popup',
url: 'notification.html',
type: 'popup',
width,
@ -93,7 +94,7 @@ class NotificationManager {
_getPopupIn (windows) {
return windows ? windows.find((win) => {
// Returns notification popup
return (win && win.type === 'popup')
return (win && win.type === 'popup' && win.id === 'metamask-popup')
}) : null
}