Skip to content

Commit a4bc3eb

Browse files
committed
fix(notifications): await polling in activation
Prevents async functions from running at same time, which may cause notifications to fire twice, etc.
1 parent 27dad6e commit a4bc3eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/notifications/activation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ export async function activate(
3838
const controller = new NotificationsController(panelNode)
3939
const engine = new RuleEngine(await getRuleContext(context, initialState))
4040

41-
void controller.pollForStartUp(engine)
42-
void controller.pollForEmergencies(engine)
41+
await controller.pollForStartUp(engine)
42+
await controller.pollForEmergencies(engine)
4343

4444
globals.clock.setInterval(async () => {
4545
const ruleContext = await getRuleContext(context, await authStateFn())

0 commit comments

Comments
 (0)