Skip to content

Commit

Permalink
Fix push returning copy of array
Browse files Browse the repository at this point in the history
  • Loading branch information
rbro112 committed Oct 25, 2024
1 parent 115ef88 commit 8babfe8
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ private fun snapshot(
)
val composeView = ComposeView(activity)
composeView.layoutParams = LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)
val args = emptyArray<Any?>().apply {
prevParam?.let(this::plus)
}
val args = if (prevParam != null) arrayOf(prevParam) else emptyArray()

val saveablePreviewConfig = previewConfig.copy(
previewParameter = previewConfig.previewParameter?.copy(index = index)
Expand Down

0 comments on commit 8babfe8

Please sign in to comment.