mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Update core-js
to allow removing a structuredClone
work-around
Because of a bug in previous `core-js` versions, which caused an Error to be thrown if its `structuredClone` polyfill was called with an *explicit* `null`/`undefined` transfer-parameter, the `LoopbackPort`-class contained a work-around. In the latest `core-js` version this has been fixed, and we can thus simplify our code ever so slightly; please see https://github.com/zloirock/core-js/releases/tag/v3.22.0
This commit is contained in:
parent
fffce7910e
commit
b996e107c3
3 changed files with 9 additions and 14 deletions
|
@ -1935,12 +1935,7 @@ class LoopbackPort {
|
|||
|
||||
postMessage(obj, transfers) {
|
||||
const event = {
|
||||
data:
|
||||
typeof PDFJSDev === "undefined" ||
|
||||
PDFJSDev.test("SKIP_BABEL") ||
|
||||
transfers
|
||||
? structuredClone(obj, transfers)
|
||||
: structuredClone(obj),
|
||||
data: structuredClone(obj, transfers),
|
||||
};
|
||||
|
||||
this._deferred.then(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue