Skip to content

Commit

Permalink
Handle base64 fallback on unsupported browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
crabbly committed May 20, 2019
1 parent d905ef5 commit 01f9d06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ export default {
break
case 'object':
params.printable = args.printable
params.fallbackPrintable = typeof args.fallbackPrintable !== 'undefined' ? args.fallbackPrintable : params.printable
params.base64 = typeof args.base64 !== 'undefined'
params.fallbackPrintable = typeof args.fallbackPrintable !== 'undefined' ? args.fallbackPrintable : params.printable
params.fallbackPrintable = params.base64 ? `data:application/pdf;base64,${params.fallbackPrintable}` : params.fallbackPrintable
for (var k in params) {
if (k === 'printable' || k === 'fallbackPrintable' || k === 'base64') continue

Expand Down

0 comments on commit 01f9d06

Please sign in to comment.