Allow empty and null key types (#35016)
This commit is contained in:
parent
2399d4d524
commit
8fde4df6ce
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { defaultsDeep, isEmpty, uniq, compact } from 'lodash';
|
||||
import { defaultsDeep, uniq, compact } from 'lodash';
|
||||
import { callClusterFactory } from '../../../xpack_main';
|
||||
import {
|
||||
LOGGING_TAG,
|
||||
|
@ -169,9 +169,6 @@ export class BulkUploader {
|
|||
// convert the raw data to a nested object by taking each payload through
|
||||
// its formatter, organizing it per-type
|
||||
const typesNested = rawData.reduce((accum, { type, result }) => {
|
||||
if (isEmpty(result)) {
|
||||
return accum;
|
||||
}
|
||||
const { type: uploadType, payload: uploadData } = collectorSet.getCollectorByType(type).formatForBulkUpload(result);
|
||||
return defaultsDeep(accum, { [uploadType]: uploadData });
|
||||
}, {});
|
||||
|
|
Loading…
Reference in a new issue