Merge "Highlighter: Fix check for comment warnings"

This commit is contained in:
jenkins-bot 2020-11-17 10:33:58 +00:00 committed by Gerrit Code Review
commit 6c8d14e88a

View file

@ -83,7 +83,7 @@ function markComment( comment ) {
marker.style.left = ( rect.left + scrollLeft ) + 'px';
marker.style.width = ( rect.width ) + 'px';
if ( comment.warnings ) {
if ( comment.warnings && comment.warnings.length ) {
markerWarnings = marker.cloneNode( false );
markerWarnings.className = 'detected-comment-warnings';
markerWarnings.innerText = comment.warnings.join( '\n' );