Skip to content

Commit

Permalink
refactor: replace ||= operator, not transformed by Babel
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardo committed Oct 10, 2024
1 parent e010301 commit 82a10b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/pivotTable/PivotTableEngine.js
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,8 @@ export class PivotTableEngine {
// accumulating other value types like text values does not make sense
if (isCumulativeValueType(valueType)) {
// initialise to 0 for cumulative types
acc ||= 0
// (||= is not transformed correctly in Babel with the current setup)
acc || (acc = 0)

if (this.data[row] && this.data[row][column]) {
const dataRow = this.data[row][column]
Expand Down

0 comments on commit 82a10b0

Please sign in to comment.