docs: tiny update on example message-ports.md (#39884)
Update message-ports.md fix multiplying object * a number. It would multiply number * number.
This commit is contained in:
parent
56e45baeb8
commit
7c2df8860b
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue