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

Commit

Permalink
minor fixes for renderToPdf
Browse files Browse the repository at this point in the history
  • Loading branch information
bridiver committed Oct 14, 2017
1 parent 4313f43 commit 6848d5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/pdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'use strict'

const tabs = require('./browser/tabs')
const {fileUrl} = require('../../js/lib/appUrlUtil')
const {fileUrl} = require('../js/lib/appUrlUtil')
const {getWebContents} = require('./browser/webContentsCache')

const renderToPdf = (appState, action) => {
Expand All @@ -27,7 +27,7 @@ const renderToPdf = (appState, action) => {
}

let pdfDataURI = 'data:application/pdf;base64,' + data.toString('base64')
tab.downloadURL(pdfDataURI, true, savePath, (downloadItem) => {
tab.downloadURL(pdfDataURI, false, savePath, (downloadItem) => {
downloadItem.once('done', function (event, state) {
if (state === 'completed') {
let finalSavePath = downloadItem.getSavePath()
Expand All @@ -36,7 +36,7 @@ const renderToPdf = (appState, action) => {
let createProperties = {
url: fileUrl(finalSavePath)
}
if (tab && !tab.isDestoyed()) {
if (tab && !tab.isDestroyed()) {
createProperties.openerTabId = tab.getId()
}
tabs.create(createProperties)
Expand Down

0 comments on commit 6848d5a

Please sign in to comment.