Skip to content

Commit

Permalink
[field] PT: test for annotation before outputting DiffCard
Browse files Browse the repository at this point in the history
  • Loading branch information
skogsmaskin authored and rexxars committed Oct 6, 2020
1 parent 5ca54b3 commit f9fa042
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,11 @@ function renderDecorators({
})
marksChanged = xor(activeMarks, uniq(marks))
// Only for decorators, annotations are taken care of elsewhere
if (marksChanged.length > 0 && marksChanged.some(m => isDecorator(m, spanSchemaType))) {
if (
marksAnnotation &&
marksChanged.length > 0 &&
marksChanged.some(m => isDecorator(m, spanSchemaType))
) {
returned = (
<DiffCard
annotation={marksAnnotation}
Expand Down

0 comments on commit f9fa042

Please sign in to comment.