[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.
This commit is contained in:
Carlos Roca
2024-04-15 13:18:50 +02:00
parent 4e1809f10b
commit e49aac8a36

View File

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