We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
2 parents9c581dd +c70ee1c commit91cc738Copy full SHA for 91cc738
web-app/src/services/state/useStateMachine.tsx
@@ -33,12 +33,12 @@ const useStateMachine = (): Output => {
33
constlistener='message'
34
// propograte channel event to state machine
35
consthandler=(event:any)=>{
36
-// NOTE: must call event.data, cannot destructure. VSCode acts odd
37
-constaction=event.data
38
-// ignore browser events from other extensions
39
-if(action.source){
+// ensure events are coming from coderoad webview
+if(!event.origin.match(/^vscode-webview/)){
40
return
41
}
+// NOTE: must call event.data, cannot destructure. VSCode acts odd
+constaction=event.data
42
sendWithLog(action)
43
44
window.addEventListener(listener,handler)