Skip to content

Commit

Permalink
explicitly retur undefined if no trackEvent is found. minor change to…
Browse files Browse the repository at this point in the history
… tests
  • Loading branch information
Christopher De Cairos committed Jun 1, 2011
1 parent 3034106 commit 2565fac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions popcorn.js
Expand Up @@ -787,6 +787,7 @@
return o;
}
}
return undefined;
};

Popcorn.getLastTrackEventId = function( obj ) {
Expand Down
2 changes: 1 addition & 1 deletion test/popcorn.unit.js
Expand Up @@ -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" );

});

Expand Down

0 comments on commit 2565fac

Please sign in to comment.