Resolves issue #115.

This commit is contained in:
Daniel Ruthardt 2017-07-30 22:06:38 +02:00 committed by Tobi Schäfer
parent 91d052af48
commit 4d92cec456

View file

@ -176,7 +176,14 @@ public class HopObjectCtor extends FunctionObject {
} catch (Exception x) {
return null;
}
return node == null ? null : Context.toObject(node, this);
if (node == null
|| !HopObjectCtor.this.core.app.getPrototype(node)
.isInstanceOf(type)) {
return null;
}
return Context.toObject(node, this);
}
public int getArity() {