Skip to content

Commit

Permalink
refactor(tap): use !! to check boolean in classList check
Browse files Browse the repository at this point in the history
  • Loading branch information
ajoslin committed Jul 7, 2014
1 parent 5bf7532 commit 685111e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/utils/tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ function tapHasPointerMoved(endEvent) {
}
var endCoordinates = getPointerCoordinates(endEvent);

var hasClassList = endEvent.target.classList && endEvent.target.classList.contains;
var hasClassList = !!(endEvent.target.classList && endEvent.target.classList.contains);
var releaseTolerance = hasClassList & endEvent.target.classList.contains('button') ?
TAP_RELEASE_BUTTON_TOLERANCE :
TAP_RELEASE_TOLERANCE;
Expand Down

0 comments on commit 685111e

Please sign in to comment.