[FIX] web_pivot_computed_measure: Take care about -Infinity value too

This commit is contained in:
Carlos Roca
2024-03-27 09:28:04 +01:00
parent 5ae9cdeb3c
commit 57fd46a868

View File

@@ -7,7 +7,7 @@ import {patch} from "web.utils";
patch(PivotRenderer.prototype, "web_pivot_computed_measure.PivotRenderer", { patch(PivotRenderer.prototype, "web_pivot_computed_measure.PivotRenderer", {
getFormattedValue(cell) { getFormattedValue(cell) {
if (cell.value === Infinity) { if (Math.abs(cell.value) === Infinity) {
return "-"; return "-";
} }
return this._super(...arguments); return this._super(...arguments);