Skip to content

Commit

Permalink
Fix BaseRow.getVisibleChildrenDatas to return null rather than [null] (
Browse files Browse the repository at this point in the history
  • Loading branch information
TomTirapani authored Feb 4, 2025
1 parent 16786f6 commit f50a194
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions data/cube/row/BaseRow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import {PlainObject, Some} from '@xh/hoist/core';
import {BucketSpec} from '@xh/hoist/data/cube/BucketSpec';
import {isEmpty, reduce} from 'lodash';
import {compact, isEmpty, reduce} from 'lodash';
import {View} from '../View';
import {RowUpdate} from './RowUpdate';

Expand Down Expand Up @@ -97,7 +97,8 @@ export abstract class BaseRow {
}

// Recurse
return children.flatMap(it => it.getVisibleDatas());
const ret = compact(children.flatMap(it => it.getVisibleDatas()));
return !isEmpty(ret) ? ret : null;
}

private isRedundantChild(parent: any, child: any) {
Expand Down

0 comments on commit f50a194

Please sign in to comment.