File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -218,8 +218,10 @@ void main() {
218218 e . preventDefault ( ) ;
219219 }
220220
221- const touchX = e . touches [ 0 ] . clientX ;
222- const touchY = e . touches [ 0 ] . clientY ;
221+ const touch = e . touches [ 0 ] ;
222+ if ( ! touch ) return ;
223+ const touchX = touch . clientX ;
224+ const touchY = touch . clientY ;
223225
224226 const x = ( touchX / window . innerWidth ) * 2 - 1 ;
225227 const y = ( touchY / window . innerHeight ) * 2 - 1 ;
Original file line number Diff line number Diff line change @@ -227,8 +227,10 @@ void main() {
227227 e . preventDefault ( ) ;
228228 }
229229
230- const touchX = e . touches [ 0 ] . clientX ;
231- const touchY = e . touches [ 0 ] . clientY ;
230+ const touch = e . touches [ 0 ] ;
231+ if ( ! touch ) return ;
232+ const touchX = touch . clientX ;
233+ const touchY = touch . clientY ;
232234
233235 const x = ( touchX / window . innerWidth ) * 2 - 1 ;
234236 const y = ( touchY / window . innerHeight ) * 2 - 1 ;
Original file line number Diff line number Diff line change 1313 "moduleResolution" : " bundler" ,
1414 "noUnusedLocals" : true ,
1515 "noUnusedParameters" : true ,
16+ "noUncheckedIndexedAccess" : true ,
1617 "resolveJsonModule" : true ,
1718 "isolatedModules" : true ,
1819 "jsx" : " react-jsx" ,
You can’t perform that action at this time.
0 commit comments