[FIX] web_editor: update value only when dirty

Before this commit
The method `updateValue` was updating value constantly
because `value` was a string and `this.props.value` a Markup.

Now
Update only when necessary

closes odoo/odoo#100965

X-original-commit: 45d4ac14f65c53dcde56592715d50169bde116ad
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
This commit is contained in:
Nicolas Bayet
2022-09-23 12:28:53 +02:00
parent 9da6640c9a
commit 78b5e4836c
@@ -186,7 +186,7 @@ export class HtmlField extends Component {
}
updateValue() {
const value = this.getEditingValue();
if (value !== null && value !== this.props.value) {
if (value !== null && value !== (this.props.value || '').toString()) {
if (this.props.setDirty) {
this.props.setDirty(true);
}