From 5791fb28d0bc9a257dc3a89852b3bb5d8e4ad432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20N=C3=A9h=C3=A9mie?= Date: Mon, 19 Dec 2016 12:40:15 +0100 Subject: [PATCH] :bug: Fix issue on master with destroyed decorations --- lib/mixins/decoration-management.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/mixins/decoration-management.js b/lib/mixins/decoration-management.js index f9770d20..f47015e4 100644 --- a/lib/mixins/decoration-management.js +++ b/lib/mixins/decoration-management.js @@ -575,7 +575,9 @@ module.exports = class DecorationManagement { for (let i = 0, len = decorations.length; i < len; i++) { let decoration = decorations[i] - this.emitDecorationChanges(decoration.getProperties().type, decoration) + if (!this.adapter.editorDestroyed()) { + this.emitDecorationChanges(decoration.getProperties().type, decoration) + } this.emitter.emit('did-remove-decoration', { marker: marker, decoration: decoration