Skip to content

Commit

Permalink
🐛 Fix issue on master with destroyed decorations
Browse files Browse the repository at this point in the history
  • Loading branch information
abe33 committed Dec 19, 2016
1 parent 426a6ab commit 5791fb2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/mixins/decoration-management.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5791fb2

Please sign in to comment.