[JS IR RUNTIME] Fix types in kotlin.js.captureStack
This commit is contained in:
@@ -79,10 +79,10 @@ fun identityHashCode(obj: Any?): Int = getObjectHashCode(obj)
|
|||||||
|
|
||||||
@JsName("captureStack")
|
@JsName("captureStack")
|
||||||
internal fun captureStack(instance: Throwable) {
|
internal fun captureStack(instance: Throwable) {
|
||||||
if (js("Error").captureStackTrace) {
|
if (js("Error").captureStackTrace != null) {
|
||||||
js("Error").captureStackTrace(instance, instance::class.js);
|
js("Error").captureStackTrace(instance, instance::class.js)
|
||||||
} else {
|
} else {
|
||||||
instance.asDynamic().stack = js("new Error()").stack;
|
instance.asDynamic().stack = js("new Error()").stack
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user