From cc5f6386df18abad185de3b6c90266cce91dc38e Mon Sep 17 00:00:00 2001 From: y9vad9 Date: Thu, 28 Dec 2023 21:17:42 +0100 Subject: [PATCH] fix: `flatten` ext for Result --- .../kotlin/io/timemates/sdk/common/internal/ResultExt.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/src/commonMain/kotlin/io/timemates/sdk/common/internal/ResultExt.kt b/sdk/src/commonMain/kotlin/io/timemates/sdk/common/internal/ResultExt.kt index 70ffb52..d20e263 100644 --- a/sdk/src/commonMain/kotlin/io/timemates/sdk/common/internal/ResultExt.kt +++ b/sdk/src/commonMain/kotlin/io/timemates/sdk/common/internal/ResultExt.kt @@ -22,7 +22,7 @@ internal fun Result>.flatten(): Result { if(value.isSuccess) { Result.success(value.getOrThrow()) } else { - Result.failure(exceptionOrThrow()) + Result.failure(value.exceptionOrThrow()) } } }