Skip to content

Commit b67e727

Browse files
committed
fix compilation
1 parent a4b60c1 commit b67e727

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/wasmJsMain/kotlin/io/github/oshai/kotlinlogging/KotlinLoggingConfiguration.kt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
package io.github.oshai.kotlinlogging
22

3-
private val startupMessageDisabledInWindow: Boolean =
3+
private fun startupMessageDisabledInWindow(): Boolean =
44
js(
55
"typeof window !== 'undefined' && (window.KOTLIN_LOGGING_STARTUP_MESSAGE === 'false' || window.KOTLIN_LOGGING_STARTUP_MESSAGE === false)"
66
)
7-
as Boolean
87

9-
private val startupMessageDisabledInEnv: Boolean =
8+
private fun startupMessageDisabledInEnv(): Boolean =
109
js(
1110
"typeof process !== 'undefined' && process.env && (process.env.KOTLIN_LOGGING_STARTUP_MESSAGE === 'false' || process.env.KOTLIN_LOGGING_STARTUP_MESSAGE === false)"
1211
)
13-
as Boolean
1412

1513
private fun resolveStartupMessageDefault(): Boolean {
1614
try {
17-
if (startupMessageDisabledInWindow) {
15+
if (startupMessageDisabledInWindow()) {
1816
return false
1917
}
20-
if (startupMessageDisabledInEnv) {
18+
if (startupMessageDisabledInEnv()) {
2119
return false
2220
}
2321
return true

0 commit comments

Comments
 (0)