Skip to content

Commit

Permalink
fix: error when sending response message
Browse files Browse the repository at this point in the history
  • Loading branch information
levivilet committed Sep 28, 2024
1 parent 1c9636f commit 77c21a8
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions files/previewInjectedCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const handleMessageFromTestPort = (event) => {
}

const handleWindowMessage = (event) => {
const { data, target } = event
const { data } = event
const message = data
port = message.params[0]
const portType = message.params[1]
Expand All @@ -43,11 +43,6 @@ const handleWindowMessage = (event) => {
} else {
port.onmessage = handleMessage
port.postMessage('ready')
target.postMessage({
jsonrpc: '2.0',
id: message.id,
result: null,
})
}
}

Expand Down

0 comments on commit 77c21a8

Please sign in to comment.