Fix worker-based syntax annotations

This commit is contained in:
Phoenix Eliot 2016-08-12 16:28:29 -07:00
parent 2dadc8458c
commit c2ce804839

View file

@ -803,7 +803,7 @@ module.exports = class SpellView extends CocoView
# This function itself removes the unwanted annotations on a later tick.
onChangeAnnotation: (event, session) ->
unfilteredAnnotations = session.getAnnotations()
filteredAnnotations = _.remove unfilteredAnnotations, (annotation) ->
filteredAnnotations = _.reject unfilteredAnnotations, (annotation) ->
annotation.text is 'Start tag seen without seeing a doctype first. Expected e.g. <!DOCTYPE html>.'
if filteredAnnotations.length < unfilteredAnnotations.length
session.setAnnotations(filteredAnnotations)