Skip to content

fix(core): use a null-prototype hook map - #86

Open
Notryag wants to merge 1 commit into
cordiverse:mainfrom
Notryag:agent/null-prototype-hooks
Open

fix(core): use a null-prototype hook map#86
Notryag wants to merge 1 commit into
cordiverse:mainfrom
Notryag:agent/null-prototype-hooks

Conversation

@Notryag

@Notryag Notryag commented Aug 19, 2026

Copy link
Copy Markdown

What changed

Initialize EventsService._hooks with Object.create(null).

Why

This avoids inherited-prototype keys such as constructor and toString being mistaken for registered hook arrays.

Checks

  • corepack yarn test core
  • corepack yarn lint packages/core/src/events.ts

@Notryag
Notryag marked this pull request as ready for review August 19, 2026 12:06
@Notryag Notryag changed the title Use a null-prototype hook map fix(core): use a null-prototype hook map Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant