Fixed Throable cast error and changed gradle version in one more place

This commit is contained in:
kildishevps committed 2025-01-22 23:24:23 +03:00
1 parent 504e8db46b
commit c6946c90b4
5 files changed
+6 -6

No files matched your search

@@ -32,11 +32,11 @@ object JsSodiumLoader {
continuation.resumeWith(Result.success(Unit))
null
}.catch { e ->
val throwable = e as? Throwable
val throwable = e.toThrowableOrNull()
if (throwable != null) {
continuation.resumeWith(Result.failure(throwable))
} else {
continuation.resumeWith(Result.failure(Exception("Error: $e")))
continuation.resumeWith(Result.failure(Throwable("Unknown error", throwable)))
}
null
}