From 12628f02f770a9874104fd9e72c1a5ef37efd094 Mon Sep 17 00:00:00 2001 From: rnentjes Date: Sat, 15 Feb 2020 12:09:01 +0100 Subject: [PATCH] Update htmlx, update version --- build.gradle | 4 ++-- komp.ipr | 4 +++- src/main/kotlin/nl/astraeus/komp/Komponent.kt | 6 +++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index a0545ba..5eeb960 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ group 'nl.astraeus' -version '0.1.15-SNAPSHOT' +version '0.1.16-SNAPSHOT' apply plugin: 'kotlin2js' apply plugin: 'kotlin-dce-js' @@ -39,7 +39,7 @@ buildscript { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version" - compile 'org.jetbrains.kotlinx:kotlinx-html-js:0.6.10' + compile 'org.jetbrains.kotlinx:kotlinx-html-js:0.7.1' } uploadArchives { diff --git a/komp.ipr b/komp.ipr index 0fda7fd..e5af0f9 100644 --- a/komp.ipr +++ b/komp.ipr @@ -16,6 +16,9 @@ + + + diff --git a/src/main/kotlin/nl/astraeus/komp/Komponent.kt b/src/main/kotlin/nl/astraeus/komp/Komponent.kt index e0fdb42..3521be4 100644 --- a/src/main/kotlin/nl/astraeus/komp/Komponent.kt +++ b/src/main/kotlin/nl/astraeus/komp/Komponent.kt @@ -11,7 +11,11 @@ import kotlin.browser.document public typealias CssStyle = CSSStyleDeclaration.() -> Unit fun Tag.include(component: Komponent) { - component.update() + if (component.element != null) { + component.update() + } else { + component.refresh() + } val consumer = this.consumer val element = component.element