import * as Sentry from '@sentry/browser';

const { key, enabled, user, environment } = gon.sentry || {};

// We need to check for key presence here as we do not have a dsn for browser yet
if (enabled && key) {
  Sentry.init({ dsn: key, environment });

  if (user.email) {
    Sentry.configureScope(scope => {
      scope.setUser(user);
    });
  }
}

@@ -251,30 +251,8 @@
 );%0A%0A
-  if (user.email) %7B%0A  
   Se
@@ -286,18 +286,16 @@
 %3E %7B%0A    
- 
- 
 scope.se
@@ -311,18 +311,12 @@
 r);%0A
-  
   %7D);%0A
-  %7D%0A
 %7D%0A

Send user information to sentry without email