Skip to content

Commit e97a283

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 97b00d0 commit e97a283

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
@@ -295,11 +295,11 @@ export class HypercertOperationsImpl extends EventEmitter<HypercertEvents> imple
295295
hypercertRecord.locations = locationRefs.map((ref) => ({ uri: ref.uri, cid: ref.cid }));
296296
}
297297

298-
if (params.shortDescriptionFacets) {
298+
if (params.shortDescriptionFacets !== undefined) {
299299
hypercertRecord.shortDescriptionFacets = params.shortDescriptionFacets;
300300
}
301301

302-
if (params.descriptionFacets) {
302+
if (params.descriptionFacets !== undefined) {
303303
hypercertRecord.descriptionFacets = params.descriptionFacets;
304304
}
305305

0 commit comments

Comments
 (0)