From 45af962a6a509c63637c16d16c836d5119fda91d Mon Sep 17 00:00:00 2001 From: Chad Weider Date: Sun, 4 Mar 2012 13:10:36 -0800 Subject: [PATCH] Patch use of `forEach` after method was removed. Corrects 465f6c2de73887d60400fb59d422f559d75a1388. --- static/js/broadcast_slider.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/static/js/broadcast_slider.js b/static/js/broadcast_slider.js index 0bdc2cab..2b67ac73 100644 --- a/static/js/broadcast_slider.js +++ b/static/js/broadcast_slider.js @@ -22,6 +22,8 @@ // These parameters were global, now they are injected. A reference to the // Timeslider controller would probably be more appropriate. +var forEach = require('./ace2_common').forEach; + function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded) { var BroadcastSlider; @@ -173,7 +175,7 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded) $("#authorstable").empty(); var numAnonymous = 0; var numNamed = 0; - authors.forEach(function(author) + forEach(authors, function(author) { if (author.name) { @@ -467,7 +469,7 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded) $("#timeslider").show(); setSliderLength(clientVars.totalRevs); setSliderPosition(clientVars.revNum); - clientVars.savedRevisions.forEach(function(revision) + forEach(clientVars.savedRevisions, function(revision) { addSavedRevision(revision.revNum, revision); })