Simplify getting callback
This commit is contained in:
parent
5b260dbee3
commit
622bad1cff
1 changed files with 1 additions and 4 deletions
|
@ -58,14 +58,11 @@ bool OpenExternal(
|
|||
}
|
||||
|
||||
if (args->Length() >= 3) {
|
||||
v8::Local<v8::Value> peek = args->PeekNext();
|
||||
platform_util::OpenExternalCallback callback;
|
||||
if (mate::Converter<platform_util::OpenExternalCallback>::FromV8(
|
||||
args->isolate(), peek, &callback)) {
|
||||
if (args->GetNext(&callback)) {
|
||||
platform_util::OpenExternal(url, activate, callback);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return platform_util::OpenExternal(url, activate);
|
||||
|
|
Loading…
Add table
Reference in a new issue