3
0
Fork 0

[FIX] web_pivot_computed_measure: Avoid Infinity errors by comparisons

As with the values that computed measurements can take, comparisons can
also take these values which are formatted by the function
getFormattedVariation. So we extend this method to take infinite values
into account.
15.0-ocabot-merge-pr-2789-by-pedrobaeza-bump-patch
Carlos Roca 2024-04-15 13:18:50 +02:00
parent 4e1809f10b
commit e49aac8a36
1 changed files with 6 additions and 0 deletions

View File

@ -12,4 +12,10 @@ patch(PivotRenderer.prototype, "web_pivot_computed_measure.PivotRenderer", {
} }
return this._super(...arguments); return this._super(...arguments);
}, },
getFormattedVariation(cell) {
if (Math.abs(cell.value) === Infinity) {
return "-";
}
return this._super(...arguments);
},
}); });