Skip to content

Commit

Permalink
Fix layout coordinates crash
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-megh-l committed Jan 17, 2024
1 parent c5b0e44 commit 829017f
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 829017f

Please sign in to comment.