diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-06-26 03:31:05 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-06-26 03:31:05 +0200 |
| commit | d96b2956888e7b6cf9b036e6ae452e7fc5b4623b (patch) | |
| tree | 5ec488faa795640158ad77b7947c9b64318a0d15 /client | |
| parent | 06174dd8d56f31acd0cb49036013a29982d76458 (diff) | |
touch events
Diffstat (limited to 'client')
| -rw-r--r-- | client/lib/util.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/client/lib/util.js b/client/lib/util.js index 6eea11f..c6df6ec 100644 --- a/client/lib/util.js +++ b/client/lib/util.js @@ -14,7 +14,7 @@ const browser = { isIphone, isIpad, isMobile, isDesktop } function clamp(n,a,b){ return n<a?a:n<b?n:b } function choice (a){ return a[ Math.floor(Math.random() * a.length) ] } function mod(n,m){ return n-(m * Math.floor(n/m)) } -function firstTouch(f){ return e => e.preventDefault && f(e.touches[0]) } +function firstTouch(f){ return e => { e.preventDefault(); f(e.touches[0]) }} function requestAudioContext (fn) { if (isMobile) { |
