Browse Source

Use logger for errors in text component

pull/2524/head
Artur Arseniev 7 years ago
parent
commit
a63b80d4e4
  1. 8
      src/dom_components/view/ComponentTextView.js

8
src/dom_components/view/ComponentTextView.js

@ -35,13 +35,13 @@ export default ComponentView.extend({
return; return;
} }
e && e.stopPropagation && e.stopPropagation(); e && e.stopPropagation && e.stopPropagation();
const rte = this.rte; const { rte, em } = this;
if (rte) { if (rte) {
try { try {
this.activeRte = rte.enable(this, this.activeRte); this.activeRte = rte.enable(this, this.activeRte);
} catch (err) { } catch (err) {
console.error(err); em.logError(err);
} }
} }
@ -57,14 +57,14 @@ export default ComponentView.extend({
* @private * @private
* */ * */
disableEditing() { disableEditing() {
const { model, rte, activeRte } = this; const { model, rte, activeRte, em } = this;
const editable = model.get('editable'); const editable = model.get('editable');
if (rte && editable) { if (rte && editable) {
try { try {
rte.disable(this, activeRte); rte.disable(this, activeRte);
} catch (err) { } catch (err) {
console.error(err); em.logError(err);
} }
this.syncContent(); this.syncContent();

Loading…
Cancel
Save