Skip to content
This repository was archived by the owner on Jan 20, 2023. It is now read-only.

Commit cf09caa

Browse files
committed
null入力時はコンバータを動かさないよう修正
1 parent a10e6b6 commit cf09caa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/com/mapk/kmapper/BoundParameterForMap.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ internal sealed class BoundParameterForMap<S> {
2929
override val propertyGetter: Method,
3030
private val converter: KFunction<*>
3131
) : BoundParameterForMap<S>() {
32-
override fun map(src: S): Any? = converter.call(propertyGetter.invoke(src))
32+
override fun map(src: S): Any? = propertyGetter.invoke(src)?.let { converter.call(it) }
3333
}
3434

3535
internal class UseKMapper<S : Any>(

0 commit comments

Comments
 (0)