Check if prototype exists in hasFunction(...).
This commit is contained in:
parent
fab876e2e7
commit
47ab428371
1 changed files with 3 additions and 0 deletions
|
@ -395,6 +395,9 @@ public final class FesiEvaluator implements ScriptingEngine {
|
||||||
String protoname = app.getPrototypeName (obj);
|
String protoname = app.getPrototypeName (obj);
|
||||||
try {
|
try {
|
||||||
ObjectPrototype op = getPrototype (protoname);
|
ObjectPrototype op = getPrototype (protoname);
|
||||||
|
// if this is an untyped object return false
|
||||||
|
if (op == null)
|
||||||
|
return false;
|
||||||
ESValue func = op.getProperty (fname, fname.hashCode());
|
ESValue func = op.getProperty (fname, fname.hashCode());
|
||||||
if (func != null && func instanceof FunctionPrototype)
|
if (func != null && func instanceof FunctionPrototype)
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue