diff --git a/src/client/index.ts b/src/client/index.ts index 1c9305c..1d43976 100644 --- a/src/client/index.ts +++ b/src/client/index.ts @@ -90,7 +90,7 @@ function apply(ctx: ClientCtx): void { ctx.slots.inject('conversation.input.overlay', () => { return ctx.slots.register( { name: 'conversation.input.overlay', id: 'context-modal', order: 10, locale: NS, - inject: (sessionId: string) => ({ hooks: { contextModal: modalStoreOf(sessionId) } }) }, + inject: (sessionId = '') => ({ hooks: { contextModal: modalStoreOf(sessionId) } }) }, props => h(ContextModal, props), ) }) diff --git a/src/client/services.ts b/src/client/services.ts index 58b1e6e..8825e5b 100644 --- a/src/client/services.ts +++ b/src/client/services.ts @@ -30,14 +30,14 @@ export interface SlotRegistration { locale?: string label?: () => string /** optional business face factory; a `hooks` compartment binds selector hooks onto props. */ - inject?: (sessionId: string) => unknown + inject?: (sessionId?: string) => unknown } export interface SlotsService { inject(name: string, callback: () => unknown): unknown register( registration: SlotRegistration, - component: (props: { sessionId?: string }) => unknown, + component: (props: { sessionId?: string } & Record) => unknown, ): unknown }