We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 481c160 commit 8537f2eCopy full SHA for 8537f2e
1 file changed
lib/internal/structured_clone.js
@@ -5,8 +5,13 @@ const {
5
receiveMessageOnPort,
6
} = require('internal/worker/io');
7
8
+const { validateObject } = require('internal/validators');
9
+
10
let channel;
11
function structuredClone(value, transfer) {
12
+ if (transfer !== undefined)
13
+ validateObject(transfer, 'transfer');
14
15
// TODO: Improve this with a more efficient solution that avoids
16
// instantiating a MessageChannel
17
channel ??= new MessageChannel();
0 commit comments