Research block tweaks / Merged in #1927

This commit is contained in:
Anuken
2020-06-19 12:26:41 -04:00
parent 15623fbe5c
commit 2280ed6071
26 changed files with 4605 additions and 4439 deletions

View File

@@ -54,12 +54,8 @@ public class Scripts implements Disposable{
public String runConsole(String text){
try{
Object o = context.evaluateString(scope, text, "console.js", 1, null);
if(o instanceof NativeJavaObject){
o = ((NativeJavaObject)o).unwrap();
}
if(o instanceof Undefined){
o = "undefined";
}
if(o instanceof NativeJavaObject) o = ((NativeJavaObject)o).unwrap();
if(o instanceof Undefined) o = "undefined";
return String.valueOf(o);
}catch(Throwable t){
return getError(t);