From a7258f48488d97451fe7d0df7386bff05765d051 Mon Sep 17 00:00:00 2001 From: Sarah Ni Date: Mon, 31 Aug 2015 15:25:42 +1000 Subject: [PATCH] For loop replaces while loop but line 50 doesn't work --- .../discourse/components/google-adsense.js.es6 | 2 -- .../javascripts/discourse/components/google-dfp-ad.js.es6 | 8 +++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/assets/javascripts/discourse/components/google-adsense.js.es6 b/assets/javascripts/discourse/components/google-adsense.js.es6 index dad8958..74e5a1d 100644 --- a/assets/javascripts/discourse/components/google-adsense.js.es6 +++ b/assets/javascripts/discourse/components/google-adsense.js.es6 @@ -1,7 +1,5 @@ import PageTracker from 'discourse/lib/page-tracker'; -console.log(Discourse.SiteSettings.adsense_nth_post_code); - var ad_width = ''; var ad_height = ''; var ad_code = ''; diff --git a/assets/javascripts/discourse/components/google-dfp-ad.js.es6 b/assets/javascripts/discourse/components/google-dfp-ad.js.es6 index 111985e..acb92f5 100755 --- a/assets/javascripts/discourse/components/google-dfp-ad.js.es6 +++ b/assets/javascripts/discourse/components/google-dfp-ad.js.es6 @@ -52,13 +52,11 @@ Foo.prototype.bar = function() { // This should call googletag.setTargeting(key for that location, value for that location) function custom_targeting(key_array, value_array) { - var i = 0; - while (i < key_array.length) { - var custom_values = []; - var wordValue = valueParse(value_array[i]) + for (var i = 0; i < key_array.length; i++) { + var wordValue = valueParse(value_array[i]); var f = new Foo(key_array[i], wordValue, googletag); f.bar(); - i++; + console.log("works!"); } }