Skip to content

Commit

Permalink
fix(cloudformation-diff): cdk diff fails on node14 (#28067)
Browse files Browse the repository at this point in the history
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.

But seriously, y'all should upgrade to a current, supported version like Node.js 18.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
mrgrain committed Nov 20, 2023
1 parent f7b8096 commit 15c3955
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cloudformation-diff/lib/diff/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}

0 comments on commit 15c3955

Please sign in to comment.