[FIX] web_editor: always notify snippet option 'reset' after 'preview'

Some code was added to prevent notifying a 'reset' if there was no
'preview' before. Unfortunately, checking "if there was a 'preview'
before" cannot be done properly so some 'reset' were stopped while they
should not have. This commit simply removes the code which is in fact
not needed.

closes odoo/odoo#44499

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
qsm-odoo
2020-02-03 13:58:38 +00:00
parent 95f40530f3
commit a5281de40e
@@ -339,13 +339,9 @@ const UserValueWidget = Widget.extend({
return;
}
// Don't notify a reset update if the widget was not previewed before.
const isPreviewed = this.isPreviewed();
if (previewMode === 'reset' && !isPreviewed) {
return;
}
// In the case we notify a change update, force a preview update if it
// was not already previewed
const isPreviewed = this.isPreviewed();
if (!previewMode && !isPreviewed) {
this.notifyValueChange(true);
}