[FIX] web_editor: remove image style when change to an other than image

closes odoo/odoo#37343

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
Gorash
2019-09-24 08:52:43 +00:00
parent 6eaf5da98a
commit b1503c7ee0
@@ -261,7 +261,7 @@ var FileWidget = SearchableMediaWidget.extend({
* @override
*/
_clear: function () {
if (!this.$media.is('img')) {
if (this.$media.is('img')) {
return;
}
var allImgClasses = /(^|\s+)((img(\s|$)|img-(?!circle|rounded|thumbnail))[^\s]*)/g;