]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
explicitly retur undefined if no trackEvent is found. minor change to tests
authorChristopher De Cairos <chris.decairos@gmail.com>
Wed, 1 Jun 2011 22:53:28 +0000 (18:53 -0400)
committerChristopher De Cairos <chris.decairos@gmail.com>
Wed, 1 Jun 2011 22:53:28 +0000 (18:53 -0400)
popcorn.js
test/popcorn.unit.js

index 06a7b53d2688e3aff9a04258784ae230d3f14c71..387852ab6a24f9c0c275ea3fc7be250ee2e0550b 100644 (file)
         return o;
       }
     }
+    return undefined;
   };
 
   Popcorn.getLastTrackEventId = function( obj ) {
index 2db787f458b2f89c1b51eba34dd42e7661080769..2327e02bf77017ab23d2bcdd6e9b3ca800aa766c 100644 (file)
@@ -1668,7 +1668,7 @@ test("getTrackEvent", function () {
   
   popped.removeTrackEvent( oldId );
 
-  equals( popped.getTrackEvent( oldId ) !== true, true,  "returned falsy value when id is not defined" );
+  equals( popped.getTrackEvent( oldId ) === undefined, true,  "returned undefined when id is not found" );
 
 });