Skip to content

Commit

Permalink
Fix layout coordinates crash (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-megh-l authored Aug 13, 2024
1 parent 38f1852 commit 60877db
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,16 @@ fun ShowcasePopup(
onShowCaseCompleted: () -> Unit,
) {
state.currentTarget?.let {
ShowcaseWindow {
ShowcaseContent(
target = it,
dismissOnClickOutside = dismissOnClickOutside
) {
state.currentTargetIndex++
if (state.currentTarget == null) {
onShowCaseCompleted()
if (it.coordinates.isAttached) {
ShowcaseWindow {
ShowcaseContent(
target = it,
dismissOnClickOutside = dismissOnClickOutside
) {
state.currentTargetIndex++
if (state.currentTarget == null) {
onShowCaseCompleted()
}
}
}
}
Expand Down

0 comments on commit 60877db

Please sign in to comment.