From babfbe40d2448c6357ae3a8522e3a57dbe567dc5 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 23 Apr 2014 11:39:40 +0800 Subject: [PATCH] Fix the capturePage method. --- atom/browser/api/atom_api_window.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/api/atom_api_window.cc b/atom/browser/api/atom_api_window.cc index e8ebb57f757..a8482ff44b9 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();