Closed Codermar closed 6 months ago
Hi, @Codermar 👋 Please take a look at this issue https://github.com/mswjs/msw/issues/2053.
What you are proposing is not a fix but a workaround. If the request
is undefined, something terrible happened and we should let that surface. In other words, request
being undefined is not a possible state, it's an unexpected state, thus we shouldn't handle it.
I've made some changes to the worker script in how we communicate requests to the main thread, so request should not be undefined anymore.
Do you have a reproduction repository for your issue? I'd love to take a look.
Thanks for the response. I am not seeing the error anymore after the update of msw": "^2.3.0"
, so far so your changes seem to be working. I Will update you if I run into it again.
I get the the following error all the time in the console
This is because the request object maybe undefined in some cases
This PR is a simple fix for that.