forked from Techsystech/web
[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
parent
4e1809f10b
commit
e49aac8a36
|
@ -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);
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue