diff options
Diffstat (limited to 'src/jsMain/kotlin/moe/nea89/website/ShellExecutionContext.kt')
-rw-r--r-- | src/jsMain/kotlin/moe/nea89/website/ShellExecutionContext.kt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/jsMain/kotlin/moe/nea89/website/ShellExecutionContext.kt b/src/jsMain/kotlin/moe/nea89/website/ShellExecutionContext.kt index bd72421..b3a7bd8 100644 --- a/src/jsMain/kotlin/moe/nea89/website/ShellExecutionContext.kt +++ b/src/jsMain/kotlin/moe/nea89/website/ShellExecutionContext.kt @@ -13,6 +13,7 @@ class ShellExecutionContext( ) { suspend fun wait(duration: Duration) { + if (!duration.isPositive()) return suspendCancellableCoroutine<Unit> { window.setTimeout({ it.resume(Unit) |