• Robert Knight's avatar
    Remove unnecessary array filter · f43663c6
    Robert Knight authored
    Remove a filter callback which always returned true. The first `!ann.id`
    condition is already part of the `store.unsavedAnnotations` logic. The
    second `isHighlight(...)` check did not work properly because the input
    was an annotation stub object with only `id` and `$tag` fields instead
    of the `Annotation` that `isHighlight` expects. For annotation stubs
    with no id, it always returned false.
    
    From a functional perspective the `isHighlight` check was also
    unnecessary. `store.unsavedAnnotations()` only returns IDs of
    annotations which have active drafts, but for highlights no draft is
    created.
    f43663c6
ThreadList-test.js 10.2 KB