1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Merge pull request #16175 from Snuffleupagus/LoopbackPort-transfer

Fix the `transfer` parameter, for `structuredClone`, in the `LoopbackPort`
This commit is contained in:
Jonas Jenwald 2023-03-20 14:22:09 +01:00 committed by GitHub
commit b1e0253f29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 25 deletions

View file

@ -1943,9 +1943,9 @@ class LoopbackPort {
#deferred = Promise.resolve();
postMessage(obj, transfers) {
postMessage(obj, transfer) {
const event = {
data: structuredClone(obj, transfers),
data: structuredClone(obj, transfer ? { transfer } : null),
};
this.#deferred.then(() => {