minor cleanup

This commit is contained in:
2025-05-22 11:34:29 +03:00
parent 45292990b1
commit 6e9250ffd1
6 changed files with 112 additions and 23 deletions

View File

@@ -15,8 +15,9 @@ public class Arguments {
public final <T extends Value> T setTargetProto(T obj) {
if (!self.isPrimitive()) {
var proto = self.getMember(env, "prototype");
if (proto instanceof ObjectValue objProto) self.setPrototype(env, objProto);
else if (proto == Value.NULL) self.setPrototype(env, null);
if (proto instanceof ObjectValue objProto) obj.setPrototype(env, objProto);
else if (proto == Value.NULL) obj.setPrototype(env, null);
}
return obj;
}