Skip to content

Commit

Permalink
Fix webContents.print() (#17116)
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 330e8ab commit 6d313b4
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 @@ -1455,7 +1455,7 @@ bool WebContents::IsDOMReady() const {

#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 @@ -263,7 +263,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 6d313b4

Please sign in to comment.