revert extract partition key (#1935)

This commit is contained in:
sunghyunkang1111 2024-08-14 02:54:20 -05:00 committed by GitHub
parent bf6b362610
commit 24860a6842
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

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