Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ceneax committed Feb 6, 2023
1 parent 1dba61a commit f5e7240
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ internal class ParamAtInitSlots : AtInitSlots {
}

bundle?.keySet()?.forEach {
val filed = control.state::class.java.getDeclaredField(it)
if (!filed.isAnnotationPresent(Param::class.java)) {
return@forEach
runCatching {
val filed = control.state::class.java.getDeclaredField(it)
if (!filed.isAnnotationPresent(Param::class.java)) {
return@forEach
}

filed.isAccessible = true
filed.set(control.state, bundle[it])
}

filed.isAccessible = true
filed.set(control.state, bundle[it])
}
}
}
Expand Down

0 comments on commit f5e7240

Please sign in to comment.