diff --git a/packages/x-components/src/composables/use-x-bus.ts b/packages/x-components/src/composables/use-x-bus.ts index 42a043f0d4..6f46753c5a 100644 --- a/packages/x-components/src/composables/use-x-bus.ts +++ b/packages/x-components/src/composables/use-x-bus.ts @@ -15,7 +15,7 @@ import { PropsWithType } from '../utils/types'; * @returns An object with the `on` and `emit` functions. */ export function useXBus(): UseXBusAPI { - const location = inject('location', undefined as any); + const location = inject('location', 'none'); const currentComponent: PrivateExtendedVueComponent | undefined | null = getCurrentInstance()?.proxy;