Skip to content

Commit

Permalink
src/translate: Fix if logic for metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
sogehige committed Aug 29, 2018
1 parent f7d425f commit e886ed5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bot/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class Translate {

addMetrics (key: String | Object) {
const version = _.get(process, 'env.npm_package_version', 'n/a')
if (typeof key === 'object' && version === 'n/a') return // skip objects (returning more than one key)
if (typeof key === 'object' || version === 'n/a') return // skip objects (returning more than one key)
if (cluster.isWorker) {
// we want to have translations aggregated on master
if (process.send) return process.send({ type: 'call', ns: 'lib.translate', fnc: 'addMetrics', args: [key] })
Expand Down

0 comments on commit e886ed5

Please sign in to comment.