forked from github/dataease
Merge pull request #9513 from dataease/pr@dev@fix_table_pivot_calc_field_error
fix(视图): 修复透视表使用计算字段导致渲染失败
This commit is contained in:
commit
700e8d9760
@ -1058,7 +1058,7 @@ function customCalcFunc(query, data, totalCfgMap) {
|
||||
if (!data?.length || !query[EXTRA_FIELD]) {
|
||||
return 0
|
||||
}
|
||||
const aggregation = totalCfgMap[query[EXTRA_FIELD]].aggregation
|
||||
const aggregation = totalCfgMap[query[EXTRA_FIELD]]?.aggregation ?? 'SUM'
|
||||
switch (aggregation) {
|
||||
case 'SUM': {
|
||||
return data.reduce((p, n) => {
|
||||
|
Loading…
Reference in New Issue
Block a user