Skip to content

Commit

Permalink
fix(source.loginUI): filter null when arrays end with comma
Browse files Browse the repository at this point in the history
see #4650
  • Loading branch information
Xwite authored Feb 12, 2025
1 parent dbf8212 commit 65d4d7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/io/legado/app/data/entities/BaseSource.kt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ interface BaseSource : JsExtensions {
fun loginUi(): List<RowUi>? {
return GSON.fromJsonArray<RowUi>(loginUi).onFailure {
it.printOnDebug()
}.getOrNull()
}.getOrNull()?.filterNotNull() // filter null, see https://github.com/gedoor/legado/discussions/4650
}

fun getLoginJs(): String? {
Expand Down Expand Up @@ -253,4 +253,4 @@ interface BaseSource : JsExtensions {
fun getShareScope(): Scriptable? {
return SharedJsScope.getScope(jsLib)
}
}
}

0 comments on commit 65d4d7f

Please sign in to comment.