mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
74f0c2a97e
commit
37227b81ab
@ -34,6 +34,9 @@ class JsTest {
|
||||
val jsMap = "$=result;id=$.id;id"
|
||||
val result = SCRIPT_ENGINE.eval(jsMap, bindings)?.toString()
|
||||
Assert.assertEquals("3242532321", result)
|
||||
val jsMap1 = """result.get("id")"""
|
||||
val result1 = SCRIPT_ENGINE.eval(jsMap1, bindings)?.toString()
|
||||
Assert.assertEquals("3242532321", result1)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -269,7 +269,6 @@ class RhinoScriptEngine : AbstractScriptEngine(), Invocable, Compilable {
|
||||
override fun hasFeature(cx: Context, featureIndex: Int): Boolean {
|
||||
return when (featureIndex) {
|
||||
Context.FEATURE_ENABLE_JAVA_MAP_ACCESS -> true
|
||||
Context.FEATURE_ENHANCED_JAVA_ACCESS -> true
|
||||
else -> super.hasFeature(cx, featureIndex)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user