Reinstating partition key fix with added check for nested partitions (#1947)

* Reinstating empty hiearchical partition key value fix

* Added use case for nested partitions

* Fix lint issue
This commit is contained in:
vchske
2024-08-26 10:00:33 -07:00
committed by GitHub
parent 833d677d20
commit 0658448b54
2 changed files with 29 additions and 1 deletions

View File

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