Remove Object.assign call. (#33860)

This commit is contained in:
Justin Kambic 2019-04-11 14:58:02 -04:00 committed by GitHub
parent b7871a5532
commit f234661825
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,13 +33,10 @@ export function formatEsBucketsForHistogram<T extends UMESBucket>(
const nextItem = array[index + 1]; const nextItem = array[index + 1];
const bucketSize = nextItem ? Math.abs(nextItem.key - key) : Math.abs(terminalBucketTime - key); const bucketSize = nextItem ? Math.abs(nextItem.key - key) : Math.abs(terminalBucketTime - key);
return Object.assign( return {
{}, x: key + bucketSize,
{ x0: key,
x: key + bucketSize, ...item,
x0: key, };
},
item
);
}); });
} }