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) } } }