Skip to content

Commit 9fb7da2

Browse files
committed
wip
1 parent 32222bd commit 9fb7da2

File tree

1 file changed

+7
-7
lines changed
  • packages/signals/signals/src/core/processor

1 file changed

+7
-7
lines changed

packages/signals/signals/src/core/processor/sandbox.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -287,18 +287,18 @@ const processWithGlobalScopeExecutionEnv = (
287287
const signals = new WebSignalsRuntime(signalBuffer)
288288

289289
const originalAnalytics = g.analytics
290-
try {
291-
if (g['analytics'] instanceof AnalyticsRuntime) {
292-
throw new Error(
293-
'Invariant: analytics variable was not properly restored on the previous execution. This indicates a concurrency bug'
294-
)
295-
}
290+
if (originalAnalytics instanceof AnalyticsRuntime) {
291+
throw new Error(
292+
'Invariant: analytics variable was not properly restored on the previous execution. This indicates a concurrency bug'
293+
)
294+
}
296295

296+
try {
297297
g['analytics'] = analytics
298-
299298
g['signals'] = signals
300299
processSignal(signal, {
301300
// we eventually want to get rid of globals and processSignal just uses local variables.
301+
// TODO: update processSignal generator to accept params like these for web (mobile currently uses globals for their architecture -- can be changed but hard).
302302
analytics: analytics,
303303
signals: signals,
304304
// constants

0 commit comments

Comments
 (0)