Skip to content

Commit

Permalink
Merge pull request eKoopmans#238 from oschwede/fix/sandbox-promises
Browse files Browse the repository at this point in the history
Fix/sandbox promises
  • Loading branch information
eKoopmans authored Jul 8, 2019
2 parents d87c258 + 263f54f commit db15497
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ export default [
external: [
'jspdf',
'html2canvas',
'es6-promise/auto'
],
globals: {
'es6-promise': 'es6promise',
jspdf: 'jsPDF',
html2canvas: 'html2canvas'
},
Expand All @@ -57,9 +57,9 @@ export default [
external: [
'jspdf',
'html2canvas',
'es6-promise/auto'
],
globals: {
'es6-promise': 'es6promise',
jspdf: 'jsPDF',
html2canvas: 'html2canvas'
},
Expand All @@ -81,6 +81,7 @@ export default [
{ file: pkg.browser.replace(/js$/, 'bundle.js'), format: 'umd' }
],
globals: {
'es6-promise': 'es6promise',
jspdf: 'jsPDF',
html2canvas: 'html2canvas'
},
Expand All @@ -100,6 +101,7 @@ export default [
{ file: pkg.browser.replace(/js$/, 'bundle.min.js'), format: 'umd' }
],
globals: {
'es6-promise': 'es6promise',
jspdf: 'jsPDF',
html2canvas: 'html2canvas'
},
Expand Down
2 changes: 0 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'es6-promise/auto';

import Worker from './worker.js';
import './plugin/jspdf-plugin.js';
import './plugin/pagebreaks.js';
Expand Down
2 changes: 2 additions & 0 deletions src/worker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import jsPDF from 'jspdf';
import html2canvas from 'html2canvas';
import { objType, createElement, cloneNode, toPx } from './utils.js';
import es6promise from 'es6-promise';
var Promise = es6promise.Promise;

/* ----- CONSTRUCTOR ----- */

Expand Down

0 comments on commit db15497

Please sign in to comment.