Skip to content

Commit

Permalink
bugfix on errorTitle
Browse files Browse the repository at this point in the history
  • Loading branch information
lucapiccinelli committed Jun 28, 2021
1 parent 0f197ab commit 9528768
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ add in pom.xml
<dependency>
<groupId>io.github.lucapiccinelli</groupId>
<artifactId>konad</artifactId>
<version>1.2.4</version>
<version>1.2.5</version>
</dependency>
```

#### Gradle
add in build.gradle
```groovy
dependencies {
implementation "io.github.lucapiccinelli:konad:1.2.4"
implementation "io.github.lucapiccinelli:konad:1.2.5"
}
```

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>io.github.lucapiccinelli</groupId>
<artifactId>konad</artifactId>
<version>1.2.4</version>
<version>1.2.5</version>
<packaging>jar</packaging>

<name>io.github.lucapiccinelli konad</name>
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/io/konad/Result.kt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ sealed class Result<out T>: ApplicativeFunctorKind<ResultOf, T>, MonadKind<Resul
is Ok -> this
is Errors -> copy(
error = error.copy(title = (error.title?.run { "$title$separator${error.title}" } ?: title)),
prev = prev?.run { errorTitle(title) as Errors })
prev = prev?.run { errorTitle(title, separator) as Errors })
}

override fun <R> mapK(fn: (T) -> R): FunctorKind<ResultOf, R> = map(fn)
Expand Down

0 comments on commit 9528768

Please sign in to comment.