From 2565fac054448caf5fd998dffdd4420bf8c922d2 Mon Sep 17 00:00:00 2001 From: Christopher De Cairos Date: Wed, 1 Jun 2011 18:53:28 -0400 Subject: [PATCH] explicitly retur undefined if no trackEvent is found. minor change to tests --- popcorn.js | 1 + test/popcorn.unit.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/popcorn.js b/popcorn.js index 06a7b53..387852a 100644 --- a/popcorn.js +++ b/popcorn.js @@ -787,6 +787,7 @@ return o; } } + return undefined; }; Popcorn.getLastTrackEventId = function( obj ) { diff --git a/test/popcorn.unit.js b/test/popcorn.unit.js index 2db787f..2327e02 100644 --- a/test/popcorn.unit.js +++ b/test/popcorn.unit.js @@ -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" ); }); -- 2.43.0