Skip to content

Commit

Permalink
🐛 Prevent removal of inexistant decorations
Browse files Browse the repository at this point in the history
  • Loading branch information
abe33 committed Dec 3, 2014
1 parent 600e5bb commit a8e21c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/mixins/decoration-management.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ class DecorationManagement extends Mixin
# marker - The `marker` for which removing decorations.
removeAllDecorationsForMarker: (marker) ->
return unless marker?
decorations = @decorationsByMarkerId[marker.id].slice()
decorations = @decorationsByMarkerId[marker.id]?.slice()
return unless decorations
for decoration in decorations
@emitter.emit 'did-remove-decoration', {marker, decoration}
@stackDecorationChanges(decoration)
Expand Down

0 comments on commit a8e21c2

Please sign in to comment.