diff --git a/x-pack/plugins/uptime/server/lib/helper/format_es_buckets_for_histogram.ts b/x-pack/plugins/uptime/server/lib/helper/format_es_buckets_for_histogram.ts index 7007d28b1af2..1b0a2bfdfc5c 100644 --- a/x-pack/plugins/uptime/server/lib/helper/format_es_buckets_for_histogram.ts +++ b/x-pack/plugins/uptime/server/lib/helper/format_es_buckets_for_histogram.ts @@ -33,13 +33,10 @@ export function formatEsBucketsForHistogram( const nextItem = array[index + 1]; const bucketSize = nextItem ? Math.abs(nextItem.key - key) : Math.abs(terminalBucketTime - key); - return Object.assign( - {}, - { - x: key + bucketSize, - x0: key, - }, - item - ); + return { + x: key + bucketSize, + x0: key, + ...item, + }; }); }