Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions web-app/src/services/state/useStateMachine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ const useStateMachine = (): Output => {
const listener = 'message'
// propograte channel event to state machine
const handler = (event: any) => {
// NOTE: must call event.data, cannot destructure. VSCode acts odd
const action = event.data
// ignore browser events from other extensions
if (action.source) {
// ensure events are coming from coderoad webview
if (!event.origin.match(/^vscode-webview/)) {
return
}
// NOTE: must call event.data, cannot destructure. VSCode acts odd
const action = event.data
sendWithLog(action)
}
window.addEventListener(listener, handler)
Expand Down