File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ import { setValueAtPath } from "lib/shared/obj-path"
2222globalThis . React = React
2323setupFetchProxy ( )
2424
25+ // Polyfill for Node.js global object in browser workers
26+ // Needed because @tscircuit /core and dependencies reference global.debugGraphics/debugOutputArray
27+ globalThis . global = globalThis . global || globalThis
28+
2529let executionContext : ExecutionContext | null = null
2630let debugNamespace : string | undefined
2731
@@ -196,7 +200,7 @@ const webWorkerApi = {
196200 let element : any
197201 if ( typeof component === "function" ) {
198202 element = component ( )
199- } else if ( component && component . __isSerializedReactElement ) {
203+ } else if ( component ? .__isSerializedReactElement ) {
200204 element = deserializeReactElement ( component )
201205 } else {
202206 element = component
You can’t perform that action at this time.
0 commit comments