mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
fix(source.loginUI): filter null when arrays end with comma
see https://github.com/gedoor/legado/discussions/4650
This commit is contained in:
@@ -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? {
|
||||
@@ -253,4 +253,4 @@ interface BaseSource : JsExtensions {
|
||||
fun getShareScope(): Scriptable? {
|
||||
return SharedJsScope.getScope(jsLib)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user