Fixes for require
This commit is contained in:
@@ -62,18 +62,20 @@ namespace Upsilon.BaseTypes.ScriptFunction
|
||||
}
|
||||
}
|
||||
|
||||
object result;
|
||||
try
|
||||
{
|
||||
var result = method.Invoke(_object, objects.ToArray());
|
||||
if (_directTypeManipulation)
|
||||
return (ScriptType)result;
|
||||
return result.ToScriptType();
|
||||
result = method.Invoke(_object, objects.ToArray());
|
||||
}
|
||||
catch (TargetInvocationException e)
|
||||
{
|
||||
if (e.InnerException != null) throw e.InnerException;
|
||||
throw;
|
||||
}
|
||||
if (_directTypeManipulation)
|
||||
return (ScriptType)result;
|
||||
return result.ToScriptType();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user