This commit is contained in:
kunfei
2023-03-19 18:10:31 +08:00
parent df83e24074
commit 67dd0ce187
3 changed files with 6 additions and 6 deletions
@@ -27,8 +27,8 @@ interface BaseBook : RuleDataInterface {
putVariable("custom", value) putVariable("custom", value)
} }
fun getCustomVariable(): String? { fun getCustomVariable(): String {
return getVariable("custom") return getVariable("custom") ?: ""
} }
override fun putBigVariable(key: String, value: String?) { override fun putBigVariable(key: String, value: String?) {
@@ -196,8 +196,8 @@ interface BaseSource : JsExtensions {
/** /**
* 获取自定义变量 * 获取自定义变量
*/ */
fun getVariable(): String? { fun getVariable(): String {
return CacheManager.get("sourceVariable_${getKey()}") return CacheManager.get("sourceVariable_${getKey()}") ?: ""
} }
/** /**
@@ -24,8 +24,8 @@ interface RuleDataInterface {
fun putBigVariable(key: String, value: String?) fun putBigVariable(key: String, value: String?)
fun getVariable(key: String): String? { fun getVariable(key: String): String {
return variableMap[key] ?: getBigVariable(key) return variableMap[key] ?: getBigVariable(key) ?: ""
} }
fun getBigVariable(key: String): String? fun getBigVariable(key: String): String?