Switch to using push to add on read applications
Signed-off-by: Robert Bunning <rbunning@webstaurantstore.com>
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user