Skip to content

Commit

Permalink
Revert change to inline function
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed May 22, 2024
1 parent 0a1e2f2 commit 90d4720
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/extension/tab/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,16 @@ function getClientData() {

handleRpc("getClientOperations", getClientData);

function sendHookDataToDevTools(eventName: "connectToDevtools") {
tab.send({
type: eventName,
payload: getClientData(),
});
}

tab.on("connectToClient", () => {
if (hook.ApolloClient) {
tab.send({ type: "connectToDevtools", payload: getClientData() });
sendHookDataToDevTools("connectToDevtools");
} else {
findClient();
}
Expand Down

0 comments on commit 90d4720

Please sign in to comment.