From 6f8efe74c4beb4e0c3c33dfe532a9692e561e71c Mon Sep 17 00:00:00 2001 From: TopchetoEU <36534413+TopchetoEU@users.noreply.github.com> Date: Wed, 4 Sep 2024 10:45:14 +0300 Subject: [PATCH] fix: print was returning java null, not JS undefined --- src/java/me/topchetoeu/jscript/runtime/SimpleRepl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/java/me/topchetoeu/jscript/runtime/SimpleRepl.java b/src/java/me/topchetoeu/jscript/runtime/SimpleRepl.java index 21ddfaa..8fc9e68 100644 --- a/src/java/me/topchetoeu/jscript/runtime/SimpleRepl.java +++ b/src/java/me/topchetoeu/jscript/runtime/SimpleRepl.java @@ -337,8 +337,9 @@ public class SimpleRepl { if (el instanceof StringValue) System.out.print(((StringValue)el).value); else System.out.print(el.toReadable(args.env)); } + System.out.println(); - return null; + return Value.UNDEFINED; })); } private static void initEngine() {