fix: 本地导入没有包含在数组内的单个书源时无法解析
This commit is contained in:
@@ -58,13 +58,13 @@ object SourceAnalyzer {
|
|||||||
bookSources.add(it)
|
bookSources.add(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch {
|
} catch (_: Exception) {
|
||||||
val item: Map<String, Any> = documentContext.read("$")
|
val item: Map<String, Any> = documentContext.read("$")
|
||||||
val jsonItem = jsonPath.parse(item)
|
val jsonItem = jsonPath.parse(item)
|
||||||
jsonToBookSource(jsonItem.jsonString()).getOrThrow().let {
|
jsonToBookSource(jsonItem.jsonString()).getOrThrow().let {
|
||||||
bookSources.add(it)
|
bookSources.add(it)
|
||||||
}
|
}
|
||||||
} catch {
|
} catch (_: Exception) {
|
||||||
throw NoStackTraceException(appCtx.getString(R.string.wrong_format))
|
throw NoStackTraceException(appCtx.getString(R.string.wrong_format))
|
||||||
}
|
}
|
||||||
bookSources
|
bookSources
|
||||||
|
|||||||
Reference in New Issue
Block a user