Skip to content

Commit

Permalink
fix(formatters): Tree Data use nullish coallescing w/optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Apr 29, 2021
1 parent 7c532ab commit f6cf14c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/common/src/formatters/treeFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export const treeFormatter: Formatter = (_row, _cell, value, columnDef, dataCont
const dataView = grid?.getData<SlickDataView>();
const gridOptions = grid?.getOptions();
const treeDataOptions = gridOptions?.treeDataOptions;
const treeLevelPropName = treeDataOptions?.levelPropName || '__treeLevel';
const indentMarginLeft = treeDataOptions?.indentMarginLeft || 15;
const treeLevelPropName = treeDataOptions?.levelPropName ?? '__treeLevel';
const indentMarginLeft = treeDataOptions?.indentMarginLeft ?? 15;
let outputValue = value;

if (typeof columnDef.queryFieldNameGetterFn === 'function') {
Expand Down

0 comments on commit f6cf14c

Please sign in to comment.