@@ -5,29 +5,29 @@ import OptimizeContext from "./OptimizeContext";
55class Experiment extends React . Component {
66 static defaultProps = {
77 loader : null ,
8- timeout : 3000
8+ timeout : 3000 ,
99 } ;
1010
1111 static propTypes = {
1212 id : PropTypes . string . isRequired ,
1313 loader : PropTypes . node ,
1414 timeout : PropTypes . number ,
15- children : PropTypes . node
15+ children : PropTypes . node ,
1616 } ;
1717
1818 state = {
19- variant : null
19+ variant : null ,
2020 } ;
2121
2222 updateVariantTimeout = null ;
2323
24- updateVariant = value => {
24+ updateVariant = ( value ) => {
2525 clearTimeout ( this . updateVariantTimeout ) ;
2626 // if experiment not active, render original
2727 const newVariant = value === undefined || value === null ? "0" : value ;
2828 if ( newVariant !== this . state . variant ) {
2929 this . setState ( {
30- variant : newVariant
30+ variant : newVariant ,
3131 } ) ;
3232 }
3333 } ;
@@ -54,7 +54,7 @@ class Experiment extends React.Component {
5454 window . gtag &&
5555 window . gtag ( "event" , "optimize.callback" , {
5656 name : this . props . id ,
57- callback : this . updateVariant
57+ callback : this . updateVariant ,
5858 } ) ;
5959 } ;
6060
@@ -85,7 +85,7 @@ class Experiment extends React.Component {
8585 window . gtag ( "event" , "optimize.callback" , {
8686 name : this . props . id ,
8787 callback : this . updateVariant ,
88- remove : true
88+ remove : true ,
8989 } ) ;
9090 }
9191
0 commit comments