Skip to content

Commit

Permalink
Fix Runtime warning on pushing multiple items into NavigationStackCon…
Browse files Browse the repository at this point in the history
…troller (TCA only) (#248)

* fix, add if isEmpty condition on removing invalid indices

* fix wrong isEmptyPosition

---------

Co-authored-by: Chavin Panicharoen <chavin.p@arise.tech>
  • Loading branch information
loongallday and Chavin Panicharoen authored Feb 25, 2025
1 parent a488fef commit 7bf6bbf
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@
invalidIndices.insert(index)
}
}
path.remove(atOffsets: invalidIndices)
if !invalidIndices.isEmpty {
path.remove(atOffsets: invalidIndices)
}
setViewControllers(newViewControllers, animated: !transaction.uiKit.disablesAnimations)
}
}
Expand Down

0 comments on commit 7bf6bbf

Please sign in to comment.