mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Fix the capturePage method.
This commit is contained in:
@@ -316,7 +316,7 @@ void Window::CapturePage(mate::Arguments* args) {
|
||||
gfx::Rect rect;
|
||||
base::Callback<void(v8::Handle<v8::Value>)> callback;
|
||||
|
||||
if (!(args->Length() == 1 && args->GetNext(&callback)) ||
|
||||
if (!(args->Length() == 1 && args->GetNext(&callback)) &&
|
||||
!(args->Length() == 2 && args->GetNext(&rect)
|
||||
&& args->GetNext(&callback))) {
|
||||
args->ThrowError();
|
||||
|
||||
Reference in New Issue
Block a user