From e33cdbb172cc2a6a6141504eea03bb6070b26fa7 Mon Sep 17 00:00:00 2001 From: TopchetoEU <36534413+TopchetoEU@users.noreply.github.com> Date: Sat, 13 Apr 2024 01:03:34 +0300 Subject: [PATCH] fix: properties not applied to wrappers without constructor method --- gradle.properties | 2 +- .../topchetoeu/jscript/utils/interop/NativeWrapperProvider.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 894f33f..a17b580 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ project_group = me.topchetoeu project_name = jscript -project_version = 0.9.40-beta +project_version = 0.9.41-beta main_class = me.topchetoeu.jscript.utils.JScriptRepl diff --git a/src/java/me/topchetoeu/jscript/utils/interop/NativeWrapperProvider.java b/src/java/me/topchetoeu/jscript/utils/interop/NativeWrapperProvider.java index d288a31..3f7573a 100644 --- a/src/java/me/topchetoeu/jscript/utils/interop/NativeWrapperProvider.java +++ b/src/java/me/topchetoeu/jscript/utils/interop/NativeWrapperProvider.java @@ -293,7 +293,7 @@ public class NativeWrapperProvider implements Copyable { new NativeFunction(getName(appliers), args -> { throw EngineException.ofError("This constructor is not invokable."); }) : create(getName(appliers), constr); - if (constr == null && !apply(res, ExposeTarget.CONSTRUCTOR, appliers)) return null; + if (!apply(res, ExposeTarget.CONSTRUCTOR, appliers) && constr == null) return null; return res; }