Fixed lost cofig values from editor fields

This commit is contained in:
FinnStutzenstein 2019-09-05 08:48:10 +02:00
parent fffbf95a63
commit b9674baa6c

View File

@ -322,7 +322,10 @@ export class ConfigFieldComponent extends BaseComponent implements OnInit {
} }
}); });
editor.on('Remove', ev => { editor.on('Remove', ev => {
if (ev.target.getContent() !== this.translatedValue) { // Do not save empty values on remove. This prevents losing the value on e.g.
// fast navigation, when the editor is not fully loaded. Then the content is empty
// and would trigger an update with empty data.
if (ev.target.getContent() && ev.target.getContent() !== this.translatedValue) {
this.update(ev.target.getContent()); this.update(ev.target.getContent());
} }
}); });