Removing check for value when populating partition key values (#1928)

* Removing check for value when populating partition key values

* Removed invalid test case

* Added unit test for empty partition key value
This commit is contained in:
vchske
2024-08-13 10:00:34 -07:00
committed by GitHub
parent 62c76cc264
commit 7f55de7aa2
2 changed files with 13 additions and 12 deletions

View File

@@ -96,9 +96,7 @@ export const extractPartitionKeyValues = (
const partitionKeyValues: PartitionKey[] = [];
partitionKeyDefinition.paths.forEach((partitionKeyPath: string) => {
const partitionKeyPathWithoutSlash: string = partitionKeyPath.substring(1);
if (documentContent[partitionKeyPathWithoutSlash]) {
partitionKeyValues.push(documentContent[partitionKeyPathWithoutSlash]);
}
partitionKeyValues.push(documentContent[partitionKeyPathWithoutSlash]);
});
return partitionKeyValues;
};