File tree 1 file changed +2
-5
lines changed
1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ var ipc = require('hadron-ipc');
8
8
var intercom = require ( './intercom' ) ;
9
9
var features = require ( './features' ) ;
10
10
var Notifier = require ( 'node-notifier' ) ;
11
- var process = require ( 'process' ) ;
12
11
13
12
var debug = require ( 'debug' ) ( 'mongodb-compass:metrics' ) ;
14
13
@@ -98,10 +97,8 @@ module.exports = function() {
98
97
debug ( 'error encountered, notify trackers' , err ) ;
99
98
// Notify user that error occurred
100
99
if ( ! _ . includes ( err . message , 'MongoError' ) ) {
101
- var icon = pkg . config . hadron . build . win32 . icon ;
102
- if ( process . platform === 'darwin' ) {
103
- icon = pkg . config . hadron . build . darwin . icon ;
104
- }
100
+ const icon = ( process . platform === 'darwin' ) ?
101
+ pkg . config . hadron . build . darwin . icon : pkg . config . hadron . build . win32 . icon ;
105
102
Notifier . notify ( {
106
103
'icon' : icon ,
107
104
'message' : 'Unexpected error occurred: ' + err . message ,
You can’t perform that action at this time.
0 commit comments