diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt index cb4ff8a80..668ab0b79 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt @@ -474,9 +474,11 @@ class AnalyzeRule(private var book: BaseBook? = null) { val regType = ruleType[j] if (regType > 0) { @Suppress("UNCHECKED_CAST") - val resultList = result as List + val resultList = result as List if (resultList.size > regType) { - infoVal.insert(0, resultList[regType]) + resultList[regType]?.let { + infoVal.insert(0, resultList[regType]) + } } } else if (regType < 0) { val jsEval: Any = evalJS(ruleParam[j], result)