Skip to content

Commit

Permalink
Fix webContents.print() (#17117)
Browse files Browse the repository at this point in the history
  • Loading branch information
trop[bot] authored and codebytere committed Feb 27, 2019
1 parent fce543d commit 8cf0e8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_web_contents.cc
Expand Up @@ -1483,7 +1483,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;
Expand Down
2 changes: 1 addition & 1 deletion lib/browser/api/web-contents.js
Expand Up @@ -313,7 +313,7 @@ WebContents.prototype.printToPDF = function (options, callback) {

WebContents.prototype.print = function (...args) {
if (features.isPrintingEnabled()) {
this._print(args)
this._print(...args)
} else {
console.error('Error: Printing feature is disabled.')
}
Expand Down

0 comments on commit 8cf0e8e

Please sign in to comment.