Skip to content

Commit

Permalink
fix updateGutter markers loop
Browse files Browse the repository at this point in the history
Because we use Map for this.markers and this.messages, we need to update this code which had remained untouched!
  • Loading branch information
aminya committed Sep 22, 2020
1 parent b548949 commit bf30d02
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,13 @@ class Editor {
name: 'linter-ui-default',
priority,
})
this.markers.forEach((marker, message) => {
this.decorateMarker(message, marker, 'gutter')
this.markers.forEach((markers: Array<BufferMarker>, key: string) => {
const message = this.messages.get(key)
if (message) {
for (const marker of markers) {
this.decorateMarker(message, marker, 'gutter')
}
}
})
}
removeGutter() {
Expand Down

0 comments on commit bf30d02

Please sign in to comment.