Skip to content

Commit a040eab

Browse files
author
Vitaliy Boyko
committed
Fixed null pointer exception on ObserverDeclarationInspection
1 parent 202e579 commit a040eab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/com/magento/idea/magento2plugin/inspections/xml/ObserverDeclarationInspection.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ public void visitFile(PsiFile file) {
7171
}
7272

7373
List<XmlTag> targetObservers = fetchObserverTagsFromEventTag(eventXmlTag);
74+
if (targetObservers.isEmpty()) {
75+
return;
76+
}
7477

7578
for (XmlTag observerXmlTag: targetObservers) {
7679
XmlAttribute observerNameAttribute = observerXmlTag.getAttribute("name");

0 commit comments

Comments
 (0)