fix: properties not applied to wrappers without constructor method

This commit is contained in:
TopchetoEU 2024-04-13 01:03:34 +03:00
parent fc6ddf7d3c
commit e33cdbb172
Signed by: topchetoeu
GPG Key ID: 6531B8583E5F6ED4
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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;
}