From 7afedd319ac191aff836e09fce9cf28ab7e156cd Mon Sep 17 00:00:00 2001 From: MuXiu1997 Date: Mon, 27 Nov 2023 02:20:18 +0800 Subject: [PATCH] feat: set a default desc for the injectKey Symbol release-as: 0.1.0-rc.4 --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index ecc81c5..a61a8cf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -156,7 +156,7 @@ export default function defineEmitterComposable>( options: Partial> = {}, ): UseEmitter | undefined> { - const injectKey = options.key ?? (Symbol() as InjectionKey>) + const injectKey = options.key ?? (Symbol('vue-use-emitter') as InjectionKey>) return ((mode: UseEmitterMode = 'inject') => { if (mode === 'provide') { const emitter: AutoOffEmitter = wrapAutoOff(mitt())