File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change 1
1
import * as React from 'react' ;
2
2
import * as ReactDOM from 'react-dom' ;
3
3
4
- ( global as any ) . gtag = ( ) => undefined ;
5
-
6
4
import Game from './Game' ;
7
5
8
6
( window as any ) . HTMLElement . prototype . scrollIntoView = ( ) => undefined ;
Original file line number Diff line number Diff line change @@ -30,9 +30,9 @@ function timeDiffInSeconds(): number {
30
30
return Math . floor ( ( new Date ( ) . getTime ( ) - startTime . getTime ( ) ) / 1000 ) ;
31
31
}
32
32
33
- const gtag = ( global as any ) . gtag as any ;
33
+ const gtag : ( a : any , b : any , c : any ) => void = ( global as any ) . gtag ;
34
34
const tagIt = ( action : string ) =>
35
- gtag ( 'event' , action , {
35
+ ! ! gtag && gtag ( 'event' , action , {
36
36
event_category : 'game' ,
37
37
event_label : new Date ( ) . toUTCString ( ) ,
38
38
value : timeDiffInSeconds ( ) ,
You can’t perform that action at this time.
0 commit comments