aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-03-23 21:57:14 +0100
committerRobert Jaros <rjaros@finn.pl>2019-03-23 21:57:14 +0100
commitc56ddc135c7caa9a9b62ced9425544d599e9eb69 (patch)
tree64b1264c9bda8c9df975944a18997a84713449bd /kvision-modules
parent514d95a8f3f16b11b406bcfc9028cbf8d662227e (diff)
downloadkvision-c56ddc135c7caa9a9b62ced9425544d599e9eb69.tar.gz
kvision-c56ddc135c7caa9a9b62ced9425544d599e9eb69.tar.bz2
kvision-c56ddc135c7caa9a9b62ced9425544d599e9eb69.zip
Code style fixes.
Diffstat (limited to 'kvision-modules')
-rw-r--r--kvision-modules/kvision-chart/src/main/kotlin/pl/treksoft/kvision/chart/Configuration.kt6
-rw-r--r--kvision-modules/kvision-redux/src/main/kotlin/pl/treksoft/kvision/redux/ReduxStore.kt2
-rw-r--r--kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt2
3 files changed, 5 insertions, 5 deletions
diff --git a/kvision-modules/kvision-chart/src/main/kotlin/pl/treksoft/kvision/chart/Configuration.kt b/kvision-modules/kvision-chart/src/main/kotlin/pl/treksoft/kvision/chart/Configuration.kt
index 7b1cddd6..0925a0c8 100644
--- a/kvision-modules/kvision-chart/src/main/kotlin/pl/treksoft/kvision/chart/Configuration.kt
+++ b/kvision-modules/kvision-chart/src/main/kotlin/pl/treksoft/kvision/chart/Configuration.kt
@@ -911,9 +911,9 @@ fun Configuration.toJs(i18nTranslator: (String) -> (String)): Chart.ChartConfigu
}
private fun Array<dynamic>.checkSingleValue(): dynamic {
- if (this.size == 1) {
- return this[0]
+ return if (this.size == 1) {
+ this[0]
} else {
- return this
+ this
}
}
diff --git a/kvision-modules/kvision-redux/src/main/kotlin/pl/treksoft/kvision/redux/ReduxStore.kt b/kvision-modules/kvision-redux/src/main/kotlin/pl/treksoft/kvision/redux/ReduxStore.kt
index 47d2c3c8..246ccef5 100644
--- a/kvision-modules/kvision-redux/src/main/kotlin/pl/treksoft/kvision/redux/ReduxStore.kt
+++ b/kvision-modules/kvision-redux/src/main/kotlin/pl/treksoft/kvision/redux/ReduxStore.kt
@@ -118,7 +118,7 @@ class ReduxStore<S : Any, A : RAction>(
reduxDispatch(elem)
}
}
- actionCreator(newDispatch, { JSON.plain.parse(stateSerializer, reduxGetState()) })
+ actionCreator(newDispatch) { JSON.plain.parse(stateSerializer, reduxGetState()) }
})
}
diff --git a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt
index 1a9460f2..924a84c1 100644
--- a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt
+++ b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt
@@ -110,7 +110,7 @@ open class CallAgent {
* @param beforeSend a content type of the request
* @return a promise of the result
*/
- @Suppress("UnsafeCastFromDynamic")
+ @Suppress("UnsafeCastFromDynamic", "ComplexMethod")
fun remoteCall(
url: String,
data: dynamic = null,