File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ if(user.checkDocumentCookie(document)) {
30
30
mixpanel . people . increment ( user . get_dId ( ) , "times" ) ;
31
31
} else {
32
32
console . log ( "No reactime cookie found. Attempting set cookie." ) ;
33
- this . setCookie ( ) ;
33
+ user . setCookie ( ) ;
34
34
mixpanel . people . set ( user . get_dId ( ) , { "times" : 1 } ) ;
35
35
}
36
36
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class MPID{
17
17
this . cookie = cookie . serialize ( "reactime" , crypto . randomBytes ( 64 ) . toString ( 'hex' ) ) ;
18
18
this . distinct_id = this . cookie ?. reactime ?. slice ( 0 , 20 ) ;
19
19
20
- if ( this . cookie && this . distinct_id ) {
20
+ if ( this . cookie ) {
21
21
return this . cookie ;
22
22
} else {
23
23
throw new Error ( "Unable to set cookie. Cookie or Distinct Id is falsey" ) ;
You can’t perform that action at this time.
0 commit comments