File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
src/internal-plugins/metrics/lib Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -94,13 +94,15 @@ module.exports = function() {
94
94
window . addEventListener ( 'error' , function ( err ) {
95
95
debug ( 'error encountered, notify trackers' , err ) ;
96
96
// Notify user that error occurred
97
- if ( ! _ . includes ( err . message , 'MongoError' ) ) {
98
- Notifier . notify ( {
99
- 'icon' : ICON_PATH ,
100
- 'message' : 'Unexpected error occurred: ' + err . message ,
101
- 'title' : 'MongoDB Compass Exception' ,
102
- 'wait' : true
103
- } ) ;
97
+ if ( process . env . NODE_ENV !== 'production' ) {
98
+ if ( ! _ . includes ( err . message , 'MongoError' ) ) {
99
+ Notifier . notify ( {
100
+ 'icon' : ICON_PATH ,
101
+ 'message' : 'Unexpected error occurred: ' + err . message ,
102
+ 'title' : 'MongoDB Compass Exception' ,
103
+ 'wait' : true
104
+ } ) ;
105
+ }
104
106
}
105
107
metrics . error ( err ) ;
106
108
// hide progress bar when an unknown error occurs.
You can’t perform that action at this time.
0 commit comments