From 0ab8e21ca285740b5b419211036db6ea478de6f4 Mon Sep 17 00:00:00 2001 From: Shagen Ogandzhanian Date: Wed, 16 Jun 2021 14:14:01 +0200 Subject: [PATCH] Unsafe cast while element creation --- .../src/jsMain/kotlin/androidx/compose/web/elements/Base.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/core/src/jsMain/kotlin/androidx/compose/web/elements/Base.kt b/web/core/src/jsMain/kotlin/androidx/compose/web/elements/Base.kt index 7e703b8367..d33107eb45 100644 --- a/web/core/src/jsMain/kotlin/androidx/compose/web/elements/Base.kt +++ b/web/core/src/jsMain/kotlin/androidx/compose/web/elements/Base.kt @@ -99,7 +99,7 @@ private object DomProvider { } private open class ElementBuilderImplementation(private val tagName: String) : ElementBuilder { - override fun create(): TElement = DomProvider.get(tagName).cloneNode() as TElement + override fun create(): TElement = DomProvider.get(tagName).cloneNode().unsafeCast() } fun interface ElementBuilder {