Skip to content

Commit a6a1ba0

Browse files
committed
Rebuild with Angular and Firefox fix
1 parent 613aba1 commit a6a1ba0

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

dist/html2pdf.bundle.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5490,7 +5490,8 @@ Worker.prototype.thenCore = function thenCore(onFulfilled, onRejected, thenBase)
54905490
}
54915491

54925492
// Cast self into a Promise to avoid polyfills recursively defining `then`.
5493-
var selfPromise = Promise.toString() !== 'function Promise() { [native code] }' ? Worker.convert(_extends({}, self), Promise.prototype) : self;
5493+
var isNative = Promise.toString().indexOf('[native code]') !== -1 && Promise.name === 'Promise';
5494+
var selfPromise = isNative ? self : Worker.convert(_extends({}, self), Promise.prototype);
54945495

54955496
// Return the promise, after casting it into a Worker and preserving props.
54965497
var returnVal = thenBase.call(selfPromise, onFulfilled, onRejected);

dist/html2pdf.bundle.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/html2pdf.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,8 @@ Worker.prototype.thenCore = function thenCore(onFulfilled, onRejected, thenBase)
549549
}
550550

551551
// Cast self into a Promise to avoid polyfills recursively defining `then`.
552-
var selfPromise = Promise.toString() !== 'function Promise() { [native code] }' ? Worker.convert(_extends({}, self), Promise.prototype) : self;
552+
var isNative = Promise.toString().indexOf('[native code]') !== -1 && Promise.name === 'Promise';
553+
var selfPromise = isNative ? self : Worker.convert(_extends({}, self), Promise.prototype);
553554

554555
// Return the promise, after casting it into a Worker and preserving props.
555556
var returnVal = thenBase.call(selfPromise, onFulfilled, onRejected);

dist/html2pdf.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/include/html2pdf.es.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,8 @@ Worker.prototype.thenCore = function thenCore(onFulfilled, onRejected, thenBase)
544544
}
545545

546546
// Cast self into a Promise to avoid polyfills recursively defining `then`.
547-
var selfPromise = Promise.toString() !== 'function Promise() { [native code] }' ? Worker.convert(_extends({}, self), Promise.prototype) : self;
547+
var isNative = Promise.toString().indexOf('[native code]') !== -1 && Promise.name === 'Promise';
548+
var selfPromise = isNative ? self : Worker.convert(_extends({}, self), Promise.prototype);
548549

549550
// Return the promise, after casting it into a Worker and preserving props.
550551
var returnVal = thenBase.call(selfPromise, onFulfilled, onRejected);

dist/require/html2pdf.cjs.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,8 @@ Worker.prototype.thenCore = function thenCore(onFulfilled, onRejected, thenBase)
548548
}
549549

550550
// Cast self into a Promise to avoid polyfills recursively defining `then`.
551-
var selfPromise = Promise.toString() !== 'function Promise() { [native code] }' ? Worker.convert(_extends({}, self), Promise.prototype) : self;
551+
var isNative = Promise.toString().indexOf('[native code]') !== -1 && Promise.name === 'Promise';
552+
var selfPromise = isNative ? self : Worker.convert(_extends({}, self), Promise.prototype);
552553

553554
// Return the promise, after casting it into a Worker and preserving props.
554555
var returnVal = thenBase.call(selfPromise, onFulfilled, onRejected);

0 commit comments

Comments
 (0)