]> khamidou — GitHub mirrors - electron.git/commitdiff
Fix a type error in checking function options.
authorHaojian Wu <hokein.wu@gmail.com>
Mon, 1 Jun 2015 09:08:15 +0000 (17:08 +0800)
committerHaojian Wu <hokein.wu@gmail.com>
Tue, 16 Jun 2015 12:02:25 +0000 (20:02 +0800)
atom/browser/api/atom_api_window.cc

index 8872a0e7f6cac7c87ae7a24abf8faf7ac8deaeb8..7ab03181993c6a41a6baa0853c1aaf138b81f20b 100644 (file)
@@ -433,7 +433,7 @@ void Window::Print(mate::Arguments* args) {
 void Window::PrintToPDF(mate::Arguments* args) {
   mate::Dictionary options;
   base::Callback<void(int)> callback;
-  if (!(args->Length() == 1 && !args->GetNext(&callback)) &&
+  if (!(args->Length() == 1 && args->GetNext(&callback)) &&
       !(args->Length() == 2 && args->GetNext(&options)
                             && args->GetNext(&callback))) {
     args->ThrowError();