From e405e216f504396554b9f0d1e88e7dc768b32b2d Mon Sep 17 00:00:00 2001 From: Chris Bower Date: Sat, 1 Jun 2013 12:45:39 -0400 Subject: [PATCH] Fixing IE8 error in segmentation IE8 was iterating a method name as a key and throwing an error. --- plugins/SegmentEditor/templates/Segmentation.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/SegmentEditor/templates/Segmentation.js b/plugins/SegmentEditor/templates/Segmentation.js index 8f38611b6dc..38a6f1f2cb3 100644 --- a/plugins/SegmentEditor/templates/Segmentation.js +++ b/plugins/SegmentEditor/templates/Segmentation.js @@ -185,9 +185,9 @@ Segmentation = (function($) { var getSegmentFromId = function (id) { if(self.availableSegments.length > 0) { - for(var key in self.availableSegments) + for(var i = 0; i < self.availableSegments.length; i++) { - segment = self.availableSegments[key]; + segment = self.availableSegments[i]; if(segment.idsegment == id) { return segment; } @@ -206,9 +206,9 @@ Segmentation = (function($) { + ' ' + self.translations['General_DefaultAppended'] + ' '; if(self.availableSegments.length > 0) { - for(var key in self.availableSegments) + for(var i = 0; i < self.availableSegments.length; i++) { - segment = self.availableSegments[key]; + segment = self.availableSegments[i]; injClass = ""; if( segment.definition == self.currentSegmentStr){ injClass = 'class="segmentSelected"'; @@ -247,9 +247,9 @@ Segmentation = (function($) { + '">' + self.translations['SegmentEditor_AddNewSegment'] + ''; segmentsDropdown.append(newOption); - for(var key in self.availableSegments) + for(var i = 0; i < self.availableSegments.length; i++) { - segment = self.availableSegments[key]; + segment = self.availableSegments[i]; newOption = ''; segmentsDropdown.append(newOption); }