Add ConvertFromCef to else statement so it's only called when not using a function

This commit is contained in:
amaitland
2015-03-11 12:09:52 +10:00
parent a09767b72c
commit 15f0a20b6d
@@ -28,11 +28,14 @@ namespace CefSharp
for (std::vector<CefRefPtr<CefV8Value>>::size_type i = 0; i != arguments.size(); i++)
{
parameter[i] = TypeUtils::ConvertFromCef(arguments[i]);
if (arguments[i]->IsFunction())
{
parameter[i] = _callbackRegistry->CreateWrapper(CefV8Context::GetCurrentContext(), arguments[i]);
}
else
{
parameter[i] = TypeUtils::ConvertFromCef(arguments[i]);
}
}
try