From f6cf14c06518d47742ee17d82a22a39af490c9e7 Mon Sep 17 00:00:00 2001 From: ghiscoding Date: Thu, 29 Apr 2021 17:02:40 -0400 Subject: [PATCH] fix(formatters): Tree Data use nullish coallescing w/optional chaining --- packages/common/src/formatters/treeFormatter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/common/src/formatters/treeFormatter.ts b/packages/common/src/formatters/treeFormatter.ts index 232cefc8e..dca87a767 100644 --- a/packages/common/src/formatters/treeFormatter.ts +++ b/packages/common/src/formatters/treeFormatter.ts @@ -6,8 +6,8 @@ export const treeFormatter: Formatter = (_row, _cell, value, columnDef, dataCont const dataView = grid?.getData(); 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') {