From 7c2df8860bdbc0121eb2b91d4f587e5a3e8dd443 Mon Sep 17 00:00:00 2001 From: Fredy Whatley Date: Thu, 21 Sep 2023 10:46:23 -0500 Subject: [PATCH] docs: tiny update on example message-ports.md (#39884) Update message-ports.md fix multiplying object * a number. It would multiply number * number. --- docs/tutorial/message-ports.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/message-ports.md b/docs/tutorial/message-ports.md index 1f5fca49487..90703a4ccdc 100644 --- a/docs/tutorial/message-ports.md +++ b/docs/tutorial/message-ports.md @@ -365,7 +365,7 @@ window.onmessage = (event) => { // process. port.onmessage = (event) => { console.log('from main process:', event.data) - port.postMessage(event.data * 2) + port.postMessage(event.data.test * 2) } } }