Skip to content

Commit 9561681

Browse files
committed
Revert Promise.await() at kotlinx-coroutines-core/wasmJs
1 parent 1b48761 commit 9561681

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kotlinx-coroutines-core/wasmJs/src/Promise.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,6 @@ public fun <T> Promise<JsAny?>.asDeferred(): Deferred<T> {
7575
public suspend fun <T> Promise<JsAny?>.await(): T = suspendCancellableCoroutine { cont: CancellableContinuation<T> ->
7676
this@await.then(
7777
onFulfilled = { cont.resume(it as T); null },
78-
onRejected = { cont.resumeWithException(it.toThrowableOrNull() ?: Exception("Non-Kotlin exception $it")); null }
78+
onRejected = { cont.resumeWithException(it.toThrowableOrNull() ?: error("Unexpected non-Kotlin exception $it")); null }
7979
)
8080
}

0 commit comments

Comments
 (0)