Skip to content

Commit

Permalink
fix: missing discarded events (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
koba04 committed Dec 19, 2022
1 parent 9f9f6e5 commit f95dbdb
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/swr-devtools/src/createSWRDevTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,16 @@ export const createSWRDevtools = () => {
key: serializedKey,
id: requestIdRef.current,
});
events.emit("request_discarded", {
key: serializedKey,
id: requestIdRef.current,
});
window.postMessage(
{
type: "request_discarded",
payload: serializePayload({
key: serializedKey,
id: requestIdRef.current,
}),
},
"*"
);
}
};
}, [serializedKey]);
Expand Down

1 comment on commit f95dbdb

@vercel
Copy link

@vercel vercel bot commented on f95dbdb Dec 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

swr-devtools – ./

swr-devtools.vercel.app
swr-devtools-git-main-koba04.vercel.app
swr-devtools-koba04.vercel.app

Please sign in to comment.