Skip to content

Commit 311bdf0

Browse files
committed
codereview comments
1 parent 2fd68ab commit 311bdf0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/app/metrics/index.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ var ipc = require('hadron-ipc');
88
var intercom = require('./intercom');
99
var features = require('./features');
1010
var Notifier = require('node-notifier');
11-
var process = require('process');
1211

1312
var debug = require('debug')('mongodb-compass:metrics');
1413

@@ -98,10 +97,8 @@ module.exports = function() {
9897
debug('error encountered, notify trackers', err);
9998
// Notify user that error occurred
10099
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;
105102
Notifier.notify({
106103
'icon': icon,
107104
'message': 'Unexpected error occurred: ' + err.message,

0 commit comments

Comments
 (0)