From: Haojian Wu Date: Mon, 1 Jun 2015 09:08:15 +0000 (+0800) Subject: Fix a type error in checking function options. X-Git-Tag: v0.28.2~6^2~17 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=10da361db12a5898e9f233536544f0d6770ef5f8;p=electron.git Fix a type error in checking function options. --- diff --git a/atom/browser/api/atom_api_window.cc b/atom/browser/api/atom_api_window.cc index 8872a0e7..7ab03181 100644 --- a/atom/browser/api/atom_api_window.cc +++ b/atom/browser/api/atom_api_window.cc @@ -433,7 +433,7 @@ void Window::Print(mate::Arguments* args) { void Window::PrintToPDF(mate::Arguments* args) { mate::Dictionary options; base::Callback 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();