From 696ef06cf68a2bfb746ed18c5a4c6ca344508e9f Mon Sep 17 00:00:00 2001 From: Dawid Sowa Date: Thu, 16 May 2024 19:38:13 +0200 Subject: [PATCH] fix: expected message data type --- src/chrome/offscreen/helpers/initialize.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/chrome/offscreen/helpers/initialize.ts b/src/chrome/offscreen/helpers/initialize.ts index 2a7fcda0..47e1c57d 100644 --- a/src/chrome/offscreen/helpers/initialize.ts +++ b/src/chrome/offscreen/helpers/initialize.ts @@ -19,12 +19,12 @@ export const initialize = (messageClient: MessageClient) => { }, sessionRouterData: () => { messageClient - .sendMessageAndWaitForConfirmation>( - createMessage.getSessionRouterData(), - ) - .andThen((data) => + .sendMessageAndWaitForConfirmation<{ + sessionRouter: Record + }>(createMessage.getSessionRouterData()) + .andThen(({ sessionRouter }) => messageClient.handleMessage( - createMessage.setSessionRouterData(data, 'offScreen'), + createMessage.setSessionRouterData(sessionRouter, 'offScreen'), ), ) },