From b06a3bf667d7966e3188390c7e884507b6a07822 Mon Sep 17 00:00:00 2001 From: Christopher De Cairos Date: Wed, 1 Jun 2011 18:35:04 -0400 Subject: [PATCH] modified the loop --- popcorn.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/popcorn.js b/popcorn.js index 5945134de..c25c08b1b 100644 --- a/popcorn.js +++ b/popcorn.js @@ -779,10 +779,10 @@ Popcorn.getTrackEvent = function( obj, trackId ) { var byStart = obj.data.trackEvents.byStart, - len = byStart.length, i; + len = byStart.length; - for (i = 0; i < len; i++) { - o = byStart[i]; + while ( len-- ) { + o = byStart[len]; if ( o._id === trackId ) { return o; }