From f23466182532da5c6114c2fe0c1bed98b8c8d977 Mon Sep 17 00:00:00 2001 From: Justin Kambic Date: Thu, 11 Apr 2019 14:58:02 -0400 Subject: [PATCH] Remove Object.assign call. (#33860) --- .../lib/helper/format_es_buckets_for_histogram.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) 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, + }; }); }