Fix a type error in checking function options.

This commit is contained in:
Haojian Wu 2015-06-01 17:08:15 +08:00
parent 36fa4da252
commit 10da361db1

View file

@ -433,7 +433,7 @@ void Window::Print(mate::Arguments* args) {
void Window::PrintToPDF(mate::Arguments* args) { void Window::PrintToPDF(mate::Arguments* args) {
mate::Dictionary options; mate::Dictionary options;
base::Callback<void(int)> callback; 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->Length() == 2 && args->GetNext(&options)
&& args->GetNext(&callback))) { && args->GetNext(&callback))) {
args->ThrowError(); args->ThrowError();