We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3320592 commit 4ad4d82Copy full SHA for 4ad4d82
packages/signals/signals/src/core/processor/sandbox.ts
@@ -292,6 +292,7 @@ const processWithGlobalScopeExecutionEnv = (
292
'Invariant: analytics variable was not properly restored on the previous execution. This indicates a concurrency bug'
293
)
294
}
295
+ const originalSignals = g.signals
296
297
try {
298
g['analytics'] = analytics
@@ -309,10 +310,9 @@ const processWithGlobalScopeExecutionEnv = (
309
310
} finally {
311
// restore globals
312
g['analytics'] = originalAnalytics
313
+ g['signals'] = originalSignals
314
315
- // this seems like it could potentially cause bugs in async environment
- g.analytics = originalAnalytics
316
return analytics.getCalls()
317
318
0 commit comments