Logs Panel: Fix inconsistent higlighting (#28971)

* Highlight filter expression in panel

* Remove coonsole.log
This commit is contained in:
Ivana Huckova 2020-11-11 09:58:21 +01:00 committed by GitHub
parent 9f48bdb016
commit 812f588a75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,7 +86,7 @@ class UnThemedLogRowMessage extends PureComponent<Props> {
const style = getLogRowStyles(theme, row.logLevel);
const { entry, hasAnsi, raw } = row;
const previewHighlights = highlighterExpressions && !_.isEqual(highlighterExpressions, row.searchWords);
const previewHighlights = highlighterExpressions?.length && !_.isEqual(highlighterExpressions, row.searchWords);
const highlights = previewHighlights ? highlighterExpressions : row.searchWords;
const needsHighlighter =
highlights && highlights.length > 0 && highlights[0] && highlights[0].length > 0 && entry.length < MAX_CHARACTERS;