From 8349341020d0fcef608a8e13dd8d8963d58871c9 Mon Sep 17 00:00:00 2001 From: Andie Swift Date: Wed, 22 Jan 2025 18:40:29 -0600 Subject: [PATCH] didnt change all the length to last --- lib/lambda/adminActions/submitNOSO.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/lambda/adminActions/submitNOSO.ts b/lib/lambda/adminActions/submitNOSO.ts index 1347b80fe..f8e7d3f6d 100644 --- a/lib/lambda/adminActions/submitNOSO.ts +++ b/lib/lambda/adminActions/submitNOSO.ts @@ -77,9 +77,9 @@ export const copyAttachments = async (data: any) => { // add the attachments to the last index of the currentPackage Change Log const last = currentPackageChangelog.hits.hits.length - 1; currentPackageChangelog.hits.hits[last]._source.attachments = attachments; - console.log("Did I change it??", currentPackageChangelog.hits.hits[length]); + console.log("Did I change it??", currentPackageChangelog.hits.hits[last]); - return currentPackageChangelog.hits.hits[length]; + return currentPackageChangelog.hits.hits[last]; } console.log("did not copy over attachements");