From 8a5cb82f595f05c77d6f6a7aa06f5c1d5e9a60cf Mon Sep 17 00:00:00 2001 From: Victor Turansky Date: Sun, 24 Nov 2024 21:23:11 +0200 Subject: [PATCH] React Legacy. Remove `asDynamic()` usages (#2449) --- kotlin-react-legacy/src/jsMain/kotlin/react/Props.ext.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kotlin-react-legacy/src/jsMain/kotlin/react/Props.ext.kt b/kotlin-react-legacy/src/jsMain/kotlin/react/Props.ext.kt index 03c94c5199e6d..8e89fdddbab6e 100644 --- a/kotlin-react-legacy/src/jsMain/kotlin/react/Props.ext.kt +++ b/kotlin-react-legacy/src/jsMain/kotlin/react/Props.ext.kt @@ -1,8 +1,10 @@ package react +import js.reflect.unsafeCast + inline var Props.ref: Ref<*>? @Deprecated("Write-only property", level = DeprecationLevel.HIDDEN) get() = error("") set(value) { - asDynamic().ref = value + unsafeCast>(this).ref = value }