From: Cheng Zhao Date: Wed, 23 Apr 2014 03:39:40 +0000 (+0800) Subject: Fix the capturePage method. X-Git-Tag: v0.12.0~18^2~4 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=babfbe40d2448c6357ae3a8522e3a57dbe567dc5;p=electron.git Fix the capturePage method. --- diff --git a/atom/browser/api/atom_api_window.cc b/atom/browser/api/atom_api_window.cc index e8ebb57f..a8482ff4 100644 --- a/atom/browser/api/atom_api_window.cc +++ b/atom/browser/api/atom_api_window.cc @@ -316,7 +316,7 @@ void Window::CapturePage(mate::Arguments* args) { gfx::Rect rect; base::Callback)> 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();