diff --git a/src/notification/bar.js b/src/notification/bar.js index 52f0bd69da..9f4258cf36 100644 --- a/src/notification/bar.js +++ b/src/notification/bar.js @@ -5,8 +5,7 @@ document.addEventListener('DOMContentLoaded', function () { setTimeout(load, 50); function load() { - var content = document.getElementById('content'), - closeButton = document.getElementById('close-button'), + var closeButton = document.getElementById('close-button'), body = document.querySelector('body'), bodyRect = body.getBoundingClientRect(); @@ -82,6 +81,7 @@ document.addEventListener('DOMContentLoaded', function () { } function setContent(element) { + const content = document.getElementById('content'); while (content.firstChild) { content.removeChild(content.firstChild); }