Skip to content

Commit

Permalink
feat: set a default desc for the injectKey Symbol
Browse files Browse the repository at this point in the history
release-as: 0.1.0-rc.4
  • Loading branch information
MuXiu1997 committed Nov 26, 2023
1 parent cf4537b commit 7afedd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export default function defineEmitterComposable<Events extends Record<EventType,
export default function defineEmitterComposable<Events extends Record<EventType, unknown>>(
options: Partial<Options<Events>> = {},
): UseEmitter<AutoOffEmitter<Events> | undefined> {
const injectKey = options.key ?? (Symbol() as InjectionKey<AutoOffEmitter<Events>>)
const injectKey = options.key ?? (Symbol('vue-use-emitter') as InjectionKey<AutoOffEmitter<Events>>)
return ((mode: UseEmitterMode = 'inject') => {
if (mode === 'provide') {
const emitter: AutoOffEmitter<Events> = wrapAutoOff(mitt())
Expand Down

0 comments on commit 7afedd3

Please sign in to comment.