This repository was archived by the owner on Feb 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import { getLanguage } from '../../../common/lang';
2626import { observer as globalObserver } from '../../../common/utils/observer' ;
2727import { showDialog } from '../../bot/tools' ;
2828import GTM from '../../../common/gtm' ;
29- import { parseQueryString } from '../../../common/utils/tools' ;
29+ import { parseQueryString , isProduction } from '../../../common/utils/tools' ;
3030import { TrackJSError } from '../logger' ;
3131import config from '../../common/const' ;
3232
@@ -56,7 +56,7 @@ const disposeBlocksWithLoaders = () => {
5656
5757const marketsWereRemoved = xml => {
5858 if ( ! Array . from ( xml . children ) . every ( block => ! removeUnavailableMarkets ( block ) ) ) {
59- if ( window . trackJs ) {
59+ if ( window . trackJs && isProduction ( ) ) {
6060 trackJs . track ( 'Invalid financial market' ) ;
6161 }
6262 showDialog ( {
Original file line number Diff line number Diff line change 11import { observer as globalObserver } from '../../common/utils/observer' ;
22import { getToken } from '../../common/utils/storageManager' ;
3+ import { isProduction } from '../../common/utils/tools' ;
34
45const log = ( type , ...args ) => {
56 if ( type === 'warn' ) {
@@ -66,7 +67,7 @@ const notifyError = error => {
6667
6768 notify ( { className : 'error' , message, position : 'right' } ) ;
6869
69- if ( trackJs ) {
70+ if ( trackJs && isProduction ( ) ) {
7071 trackJs . console . log ( error ) ;
7172 trackJs . track ( code || error . name ) ;
7273 }
Original file line number Diff line number Diff line change 11/* global google,gapi */
22import { getLanguage } from '../lang' ;
33import { observer as globalObserver } from '../utils/observer' ;
4- import { translate } from '../utils/tools' ;
4+ import { translate , isProduction } from '../utils/tools' ;
55import config from '../../botPage/common/const' ;
66import { load } from '../../botPage/view/blockly' ;
77import { TrackJSError } from '../../botPage/view/logger' ;
@@ -42,7 +42,7 @@ class GoogleDrive {
4242 . removeClass ( 'invisible' ) ;
4343 } ,
4444 error => {
45- if ( window . trackJs ) {
45+ if ( window . trackJs && isProduction ( ) ) {
4646 trackJs . track (
4747 `${ translate (
4848 'There was an error initialising Google Drive'
@@ -53,7 +53,7 @@ class GoogleDrive {
5353 ) ;
5454 } ,
5555 onerror : error => {
56- if ( window . trackJs ) {
56+ if ( window . trackJs && isProduction ( ) ) {
5757 trackJs . track (
5858 `${ translate ( 'There was an error loading Google Drive libraries' ) } - Error: ${ JSON . stringify (
5959 error
You can’t perform that action at this time.
0 commit comments