]> khamidou — GitHub mirrors - electron.git/commitdiff
Fix the capturePage method.
authorCheng Zhao <zcbenz@gmail.com>
Wed, 23 Apr 2014 03:39:40 +0000 (11:39 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 23 Apr 2014 03:39:40 +0000 (11:39 +0800)
atom/browser/api/atom_api_window.cc

index e8ebb57f75796d23b47a1bea9832d7e5df56f944..a8482ff44b95b7ed190ad4e59d2dbef7c9511a71 100644 (file)
@@ -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();