Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Fix call to Tabs.create when printing backup recovery keys
Browse files Browse the repository at this point in the history
Fix #6150

Auditors: @bsclifton

It was crashing because it was treating this api as a promise but really it uses callbacks.

Note that the print operation won't actually work until #6159 is addressed.
  • Loading branch information
bbondy authored and bridiver committed Dec 14, 2016
1 parent 4beccb8 commit 79362d3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/ledger.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,14 +270,12 @@ var backupKeys = (appState, action) => {
if (err) {
console.log(err)
} else {
Tabs.create({url: fileUrl(filePath)}).then((webContents) => {
Tabs.create({url: fileUrl(filePath)}, (webContents) => {
if (action.backupAction === 'print') {
webContents.print({silent: false, printBackground: false})
} else {
webContents.downloadURL(fileUrl(filePath))
}
}).catch((err) => {
console.error(err)
})
}
})
Expand Down

0 comments on commit 79362d3

Please sign in to comment.