Skip to content

Commit 36eacc3

Browse files
committed
fix: preserve empty arrays in facet fields
Change truthy checks to explicit !== undefined checks for shortDescriptionFacets and descriptionFacets to ensure empty arrays are preserved as valid values. Fixes unresolved comment from PR #112 review thread #3700691486
1 parent 3b9e014 commit 36eacc3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/sdk-core/src/repository/HypercertOperationsImpl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,11 @@ export class HypercertOperationsImpl extends EventEmitter<HypercertEvents> imple
283283
hypercertRecord.image = imageBlobRef;
284284
}
285285

286-
if (params.shortDescriptionFacets) {
286+
if (params.shortDescriptionFacets !== undefined) {
287287
hypercertRecord.shortDescriptionFacets = params.shortDescriptionFacets;
288288
}
289289

290-
if (params.descriptionFacets) {
290+
if (params.descriptionFacets !== undefined) {
291291
hypercertRecord.descriptionFacets = params.descriptionFacets;
292292
}
293293

0 commit comments

Comments
 (0)