Skip to content

Commit 9fe0742

Browse files
committed
refactor: code style
1 parent 7991b49 commit 9fe0742

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/s2-core/src/data-set/pivot-data-set.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,8 @@ export class PivotDataSet extends BaseDataSet {
391391
colPivotMeta: this.colPivotMeta,
392392
});
393393
if (isTotals) {
394-
const { totals = {} } = this.spreadsheet.options;
395-
if (totals.calcTotals) {
394+
const { calcTotals } = this.spreadsheet?.options?.totals || {};
395+
if (calcTotals) {
396396
// 前端计算汇总值
397397
const totalValue = getDataSumByField(
398398
this.getMultiData(query),

0 commit comments

Comments
 (0)