Skip to content

Commit

Permalink
Merge pull request mattbryson#100 from willosof/master
Browse files Browse the repository at this point in the history
Fixed a bug
  • Loading branch information
mattbryson committed Aug 24, 2013
2 parents 0af3ba8 + fb3b4e0 commit 2401012
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions jquery.touchSwipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -1597,9 +1597,10 @@
* @return int The distance of the swipe
* @inner
*/
function getMaxDistance(direction) {
return maximumsMap[direction].distance;
}
function getMaxDistance(direction) {
if (maximumsMap[direction]) return maximumsMap[direction].distance;
return undefined;
}

/**
* Creats a map of directions to maximum swiped values.
Expand Down Expand Up @@ -1958,4 +1959,4 @@
* @param {DomObject} target The element clicked on.
*/

})(jQuery);
})(jQuery);

0 comments on commit 2401012

Please sign in to comment.