From b6d5b92e03a804b4e262d12269b7f4ccb23f3d21 Mon Sep 17 00:00:00 2001 From: Louis Date: Thu, 18 Jul 2024 11:20:58 +0700 Subject: [PATCH] fix: throttle leading and trailing event --- cortex-js/src/infrastructure/controllers/events.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cortex-js/src/infrastructure/controllers/events.controller.ts b/cortex-js/src/infrastructure/controllers/events.controller.ts index 037aebcb0..cf166ec8b 100644 --- a/cortex-js/src/infrastructure/controllers/events.controller.ts +++ b/cortex-js/src/infrastructure/controllers/events.controller.ts @@ -61,7 +61,7 @@ export class EventsController { 'download.event', ).pipe( map((downloadState) => ({ data: downloadState })), - throttleTime(1000, undefined, { trailing: true }), + throttleTime(1000, undefined, { leading: true, trailing: true }), ); return merge(