From 3ff98e534b4a38c1842a762e6b075a4063d1b572 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 11 Feb 2020 10:57:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B9=A6=E6=BA=90=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/model/analyzeRule/AnalyzeRule.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 1e0670f6b..73618b142 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 @@ -117,9 +117,12 @@ class AnalyzeRule(var book: BaseBook? = null) : JsExtensions { @Throws(Exception::class) fun getStringList(ruleList: List, isUrl: Boolean = false): List? { var result: Any? = null - content?.let { o -> - if (ruleList.isNotEmpty()) { - if (ruleList.isNotEmpty()) result = o + val content = this.content + if (content != null && ruleList.isNotEmpty()) { + result = content + if (content is NativeObject) { + result = content[ruleList[0].rule]?.toString() + } else { for (sourceRule in ruleList) { putRule(sourceRule.putMap) sourceRule.makeUpRule(result)