diff options
author | sgiehl <stefan@matomo.org> | 2020-04-06 10:24:09 +0300 |
---|---|---|
committer | sgiehl <stefan@matomo.org> | 2020-04-06 10:24:09 +0300 |
commit | 3ac997619c177b46a686fa0c3311b1dfe67eceb4 (patch) | |
tree | 8c5b7ede49da491126dd5a5eac7587aea4666a7b /plugins/CoreHome | |
parent | e81cba56e0087b78385884f774970dc27dd96a99 (diff) | |
parent | bc6ec46620be2805792da6fdfe5f541f9134ca7f (diff) |
Merge branch '3.x-dev' into 4.x-dev
Diffstat (limited to 'plugins/CoreHome')
-rw-r--r-- | plugins/CoreHome/angularjs/notification/notification.directive.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/CoreHome/angularjs/notification/notification.directive.js b/plugins/CoreHome/angularjs/notification/notification.directive.js index 3be9273ca8..d8867c04c0 100644 --- a/plugins/CoreHome/angularjs/notification/notification.directive.js +++ b/plugins/CoreHome/angularjs/notification/notification.directive.js @@ -87,8 +87,9 @@ function closeExistingNotificationHavingSameIdIfNeeded(id, notificationElement) { // TODO: instead of doing a global query for notification, there should be a notification-container // directive that manages notifications. + var notificationStillExists = !!notificationElement.parents('body').length; var existingNode = angular.element('[notification-id=' + id + ']').not(notificationElement); - if (existingNode && existingNode.length) { + if (notificationStillExists && existingNode && existingNode.length) { existingNode.remove(); } } |