Skip to content

Commit

Permalink
fix(android): fix ListView may throw ClassCastException
Browse files Browse the repository at this point in the history
  • Loading branch information
iPel authored and hippy-actions[bot] committed Dec 5, 2023
1 parent 24d11f9 commit f54c035
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,10 @@ public ListItemRenderNode getChildNodeByAdapterPosition(int position) {
public ListItemRenderNode getChildNode(int position) {
RenderNode parentNode = getParentNode();
if (parentNode != null && position < parentNode.getChildCount() && position >= 0) {
return (ListItemRenderNode) parentNode.getChildAt(position);
RenderNode childNode = parentNode.getChildAt(position);
if (childNode instanceof ListItemRenderNode) {
return (ListItemRenderNode) childNode;
}
}
return null;
}
Expand Down

0 comments on commit f54c035

Please sign in to comment.