diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 26ee56082099..66fec8f57c9c 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -1458,7 +1458,7 @@ bool WebContents::IsCurrentlyAudible() { #if BUILDFLAG(ENABLE_PRINTING) void WebContents::Print(mate::Arguments* args) { - bool silent, print_background = false; + bool silent = false, print_background = false; base::string16 device_name; mate::Dictionary options = mate::Dictionary::CreateEmpty(args->isolate()); base::DictionaryValue settings; diff --git a/lib/browser/api/web-contents.js b/lib/browser/api/web-contents.js index 21eb6c9157f0..1ab129552ce5 100644 --- a/lib/browser/api/web-contents.js +++ b/lib/browser/api/web-contents.js @@ -313,7 +313,7 @@ WebContents.prototype.printToPDF = function (options) { WebContents.prototype.print = function (...args) { if (features.isPrintingEnabled()) { - this._print(args) + this._print(...args) } else { console.error('Error: Printing feature is disabled.') }