diff --git a/browser/base/content/browser-social.js b/browser/base/content/browser-social.js index 327ebb1c5986..dd00017aee09 100644 --- a/browser/base/content/browser-social.js +++ b/browser/base/content/browser-social.js @@ -1359,7 +1359,8 @@ SocialMarks = { let providers = this.getProviders(); // remove all previous entries by class - for (let m of document.getElementsByClassName("context-socialmarks")) { + let menus = [...document.getElementsByClassName("context-socialmarks")]; + for (let m of menus) { m.parentNode.removeChild(m); }