From 6f3c134bc4c9ff1ed8fbb9a87b5f11d203138e2b Mon Sep 17 00:00:00 2001 From: Momo Kornher Date: Mon, 20 Nov 2023 08:45:26 +0100 Subject: [PATCH] fix(cloudformation-diff): cdk diff fails on node14 Some folks are still stuck on node14. Replacing `.at()` with conventional array access to make it easier for them. In this particular instance there's really no benefit to the code using it. --- packages/@aws-cdk/cloudformation-diff/lib/diff/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/cloudformation-diff/lib/diff/util.ts b/packages/@aws-cdk/cloudformation-diff/lib/diff/util.ts index ff9eb3bb90e48..1c320996e6c5b 100644 --- a/packages/@aws-cdk/cloudformation-diff/lib/diff/util.ts +++ b/packages/@aws-cdk/cloudformation-diff/lib/diff/util.ts @@ -184,5 +184,5 @@ function database(): SpecDatabase { * The database is loaded lazily and cached across multiple calls to `loadResourceModel`. */ export function loadResourceModel(type: string): Resource | undefined { - return database().lookup('resource', 'cloudFormationType', 'equals', type).at(0); + return database().lookup('resource', 'cloudFormationType', 'equals', type)[0]; }