From 6b7fdeb1d80a9bc36b716c08c8009ea2e651682a Mon Sep 17 00:00:00 2001 From: mzso Date: Mon, 19 Dec 2016 12:11:49 +0100 Subject: [PATCH] Replaced now-unsupported "for each" loop With this fix the addons functions again on mozilla-central. --- scripts/helper.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/helper.js b/scripts/helper.js index d0d8870..5bea95f 100644 --- a/scripts/helper.js +++ b/scripts/helper.js @@ -570,7 +570,8 @@ function showNotification(aText, aTitle, aButtons, aCallback, aTimeout) { let buttons = [], i = 0, choiceSelected = false; let timeoutChecker = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); - for each (let button in aButtons) { + for (let property in aButtons) { + let button = buttons[property]; let index = JSON.parse(JSON.stringify(i++)); buttons.push({ label: button.label, @@ -624,7 +625,8 @@ function showContentNotification(aText, aTitle, aButtons, aCallback, aTimeout) { let buttons = [], i = 0, choiceSelected = false; let timeoutChecker = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); - for each (let button in aButtons) { + for (let property in aButtons) { + let button = buttons[property]; let index = JSON.parse(JSON.stringify(i++)); buttons.push({ label: button.label,