Skip to content

Commit

Permalink
fix null pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
kesonan committed Oct 31, 2023
1 parent e851853 commit 03f4466
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/cn/xiaoheiban/psi/nodes/ApiRootNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ public Map<IElementType, List<ASTNode>> getAllNode() {
Map<IElementType, List<ASTNode>> list = ApiFile.findChildren(psi, elementTypeSet);
list.forEach((iElementType, astNodes) -> {
List<ASTNode> gotList = children.get(iElementType);
gotList.addAll(astNodes);
children.put(iElementType, gotList);
if (gotList != null) {
gotList.addAll(astNodes);
children.put(iElementType, gotList);
}
});
}
return children;
Expand Down

0 comments on commit 03f4466

Please sign in to comment.