Skip to content

Commit 1a606b0

Browse files
tbondwilkinsonatscott
authored andcommitted
refactor(core): Switch to using concat rather than spread operator for events. (#57103)
Internally, the JSCompiler does not dead code eliminate this code when its using spread. PR Close #57103
1 parent 288a4fa commit 1a606b0

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

packages/core/primitives/event-dispatch/src/event_type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ export const isCaptureEventType = (eventType: string) =>
372372
CAPTURE_EVENT_TYPES.indexOf(eventType) >= 0;
373373

374374
/** All event types that are registered early. */
375-
const EARLY_EVENT_TYPES = [...BUBBLE_EVENT_TYPES, ...CAPTURE_EVENT_TYPES];
375+
const EARLY_EVENT_TYPES = BUBBLE_EVENT_TYPES.concat(CAPTURE_EVENT_TYPES);
376376

377377
/**
378378
* Whether or not an event type is registered in the early contract.

packages/core/test/bundling/defer/bundle.golden_symbols.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,6 @@
206206
{
207207
"name": "EventManagerPlugin"
208208
},
209-
{
210-
"name": "EventType"
211-
},
212209
{
213210
"name": "GLOBAL_EVENT_DELEGATION"
214211
},

0 commit comments

Comments
 (0)