Open sveisvei opened 2 years ago
Open to a PR to fix this? My naive PR would improve the sanity checks on states, but I assume the error really is in the actual states object MIA.
Alternative is for me to stop using the autoValue()
feature.
Hey, thanks for the report. I will take a look at this some time today, but if you can see what's wrong we'd certainly accept a PR!
I can have a look, but do you have an hunch why the state might be undefined when throwing an error inside onPreResponse?
This could very well be related to #4297, which provides some insight.
Support plan
Context
What are you trying to achieve or the steps to reproduce?
I am using the cookie state autoValue for a persistent id. When trying to use the
onPreResponse
to takeover a response, it fails because request.state is null.Reproducible demo:
What was the result you got?
Exception.
What result did you expect?
I would expect that onPreResponse can be taken over.