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

Commit

Permalink
Fix resourceType check for session.webRequest
Browse files Browse the repository at this point in the history
Test Plan:
0. Enable payments. Close Brave.
1. npm run add-simulated-payment-history
2. Go to Brave payments, open your contribution history.
3. Click on a PDF file in your contribution history. It should offer to save the file.
  • Loading branch information
diracdeltas authored and petemill committed Dec 29, 2017
1 parent 7dbb034 commit dd213bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/pdfJS.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function isPDFDownloadable (details) {
// viewer to open the PDF, but first check whether the Content-Disposition
// header specifies an attachment. This allows sites like Google Drive to
// operate correctly (#6106).
if (details.type === 'main_frame' &&
if (details.resourceType === 'mainFrame' &&
details.url.indexOf('=download') === -1) {
return false
}
Expand Down

0 comments on commit dd213bc

Please sign in to comment.