Update CustomClass.hx
This commit is contained in:
@@ -130,8 +130,11 @@ class CustomClass implements IHScriptCustomClassBehaviour {
|
||||
}
|
||||
|
||||
public function call(name:String, ?args:Array<Dynamic>, ?toSuper:Bool = false):Dynamic {
|
||||
var fn = __interp.variables.get(name);
|
||||
if(toSuper && fn == null) fn = __interp.variables.get('_HX_SUPER__$name');
|
||||
var fn:Dynamic = null;
|
||||
if (!toSuper)
|
||||
fn = __interp.variables.get(name);
|
||||
else
|
||||
fn = __interp.variables.get('_HX_SUPER__$name');
|
||||
|
||||
if (fn != null && Reflect.isFunction(fn))
|
||||
return UnsafeReflect.callMethodUnsafe(null, fn, (args == null) ? [] : args);
|
||||
|
||||
Reference in New Issue
Block a user