Skip to content

Commit

Permalink
fix: Cache children when traversing (#1027)
Browse files Browse the repository at this point in the history
  • Loading branch information
idyatlov authored Jul 31, 2024
1 parent 240739f commit eaff37d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,9 @@ class SourceDocument constructor(

if (depth < MAX_TRAVERSAL_DEPTH) {
// Visit the children and build them too
for (index in 0 until semanticsNode.children.count()) {
serializeComposeNode(semanticsNode.children[index], depth + 1)
val children = semanticsNode.children
for (index in 0 until children.count()) {
serializeComposeNode(children[index], depth + 1)
}
} else {
AndroidLogger.warn(
Expand Down

0 comments on commit eaff37d

Please sign in to comment.