Skip to content

Commit d51203a

Browse files
author
Niall O'Higgins
committed
ternary operator is hard to read and easy to use incorrectly.
just use a regular if condition.
1 parent e252872 commit d51203a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

worker.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ var path = require('path')
55
module.exports = {
66
init: function (config, job, context, done) {
77
var venvDir = path.join(context.baseDir, '.venv')
8+
var test = undefined
9+
if (config && config.test !== 'none') {
10+
test = config.test
11+
}
812
done(null, {
913
path: [path.join(__dirname, 'thirdparty'),
1014
path.join(venvDir, 'bin')],
@@ -17,7 +21,7 @@ module.exports = {
1721
}
1822
done(null, false)
1923
},
20-
test: (config && config.test !== 'none') ? config.test : undefined
24+
test: test
2125
})
2226
},
2327
autodetect: {

0 commit comments

Comments
 (0)