mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[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:
@@ -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);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user