Skip to content

Commit

Permalink
Use defaultsDeep to match what monitoring is doing (elastic#73325)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
chrisronline and elasticmachine committed Jul 31, 2020
1 parent 11d61c7 commit 1b186cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/legacy/server/status/routes/api/register_stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import Joi from 'joi';
import boom from 'boom';
import { defaultsDeep } from 'lodash';
import { i18n } from '@kbn/i18n';
import { wrapAuthConfig } from '../../wrap_auth_config';
import { getKibanaInfoForStats } from '../../lib';
Expand Down Expand Up @@ -120,10 +121,9 @@ export function registerStatsApi(usageCollection, server, config, kbnServer) {
},
};
} else {
accum = {
...accum,
[usageKey]: usage[usageKey],
};
// I don't think we need to it this for the above conditions, but do it for most as it will
// match the behavior done in monitoring/bulk_uploader
defaultsDeep(accum, { [usageKey]: usage[usageKey] });
}

return accum;
Expand Down

0 comments on commit 1b186cd

Please sign in to comment.