Skip to content

Commit

Permalink
WEB-45489: fixed NPE in error filter
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 85f06673294d43089abf90c2b99e0b49c8958042
  • Loading branch information
vepanimas authored and intellij-monorepo-bot committed Oct 23, 2020
1 parent 83298af commit 879e059
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class StyledComponentsErrorFilter : HighlightErrorFilter() {
}

override fun shouldHighlightErrorElement(element: PsiErrorElement): Boolean {
if (!STYLED_COMPONENTS_INJECTION[element.containingFile]) return true
if (!STYLED_COMPONENTS_INJECTION.get(element.containingFile, false)) return true
if (PsiUtilCore.getElementType(PsiTreeUtil.skipWhitespacesAndCommentsForward(element)) != CssElementTypes.CSS_COLON) return true

val prevElement = PsiTreeUtil.skipWhitespacesAndCommentsBackward(element)?.takeIf { it is CssTerm } ?: return true
Expand Down

0 comments on commit 879e059

Please sign in to comment.