From b6ee85d1e7e930d8d992cd3f10b6c815a0435925 Mon Sep 17 00:00:00 2001 From: Robert Bunning Date: Mon, 7 Aug 2023 15:41:55 -0400 Subject: [PATCH] Switch to using push to add on read applications Signed-off-by: Robert Bunning --- plugins/newrelic/src/api/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/newrelic/src/api/index.ts b/plugins/newrelic/src/api/index.ts index ede225dc05..3fdebd1494 100644 --- a/plugins/newrelic/src/api/index.ts +++ b/plugins/newrelic/src/api/index.ts @@ -103,7 +103,7 @@ export class NewRelicClient implements NewRelicApi { } try { - let applications: NewRelicApplication[] = []; + const applications: NewRelicApplication[] = []; let targetUrl = this.baseUrl; do { @@ -111,7 +111,7 @@ export class NewRelicClient implements NewRelicApi { await this.fetchNewRelic(targetUrl); targetUrl = nextPageUrl ?? ''; - applications = applications.concat(applicationsFromReadPage); + applications.push(...applicationsFromReadPage); } while (!!targetUrl); return { applications };