From 2c01fba0dec2f90ba86020859dd4b13781cac421 Mon Sep 17 00:00:00 2001 From: Charlie Fish Date: Thu, 28 Dec 2023 09:30:14 -0700 Subject: [PATCH] Fixing CI Signed-off-by: Charlie Fish --- packages/dynamoose/lib/utils/dynamoose/index_changes.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/dynamoose/lib/utils/dynamoose/index_changes.ts b/packages/dynamoose/lib/utils/dynamoose/index_changes.ts index 81519840..b9ce4a3b 100644 --- a/packages/dynamoose/lib/utils/dynamoose/index_changes.ts +++ b/packages/dynamoose/lib/utils/dynamoose/index_changes.ts @@ -35,11 +35,11 @@ const index_changes = async (table: Table, existingIndexes = []): Promise<(Model } const sanitizeIndex = (index: IndexItem) => { - if (Array.isArray(index.Projection.NonKeyAttributes)) { + if (Array.isArray(index.Projection.NonKeyAttributes)) { index.Projection.NonKeyAttributes.sort(); } return index; - } + }; const deleteIndexes: ModelIndexDeleteChange[] = existingIndexes.filter((index) => { const cleanedIndex = deep_copy(index); @@ -50,8 +50,8 @@ const index_changes = async (table: Table, existingIndexes = []): Promise<(Model }); return !(expectedIndexes.GlobalSecondaryIndexes || []).find((searchIndex) => obj.equals( - sanitizeIndex(obj.pick(cleanedIndex, identicalProperties) as IndexItem), - sanitizeIndex(obj.pick(searchIndex as any, identicalProperties) as IndexItem) + sanitizeIndex(obj.pick(cleanedIndex, identicalProperties) as any), + sanitizeIndex(obj.pick(searchIndex as any, identicalProperties) as any) )); }).map((index) => ({"name": index.IndexName as string, "type": TableIndexChangeType.delete})); output.push(...deleteIndexes);