From 24860a68422cfcf30a7b9bc3e40882aa1729bfec Mon Sep 17 00:00:00 2001 From: sunghyunkang1111 <114709653+sunghyunkang1111@users.noreply.github.com> Date: Wed, 14 Aug 2024 02:54:20 -0500 Subject: [PATCH] revert extract partition key (#1935) --- src/Utils/QueryUtils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Utils/QueryUtils.ts b/src/Utils/QueryUtils.ts index 59276077d..5440c2dda 100644 --- a/src/Utils/QueryUtils.ts +++ b/src/Utils/QueryUtils.ts @@ -96,7 +96,9 @@ export const extractPartitionKeyValues = ( const partitionKeyValues: PartitionKey[] = []; partitionKeyDefinition.paths.forEach((partitionKeyPath: string) => { const partitionKeyPathWithoutSlash: string = partitionKeyPath.substring(1); - partitionKeyValues.push(documentContent[partitionKeyPathWithoutSlash]); + if (documentContent[partitionKeyPathWithoutSlash]) { + partitionKeyValues.push(documentContent[partitionKeyPathWithoutSlash]); + } }); return partitionKeyValues; };