can-connect
can-connect copied to clipboard
cacheConnection.updateData should do nothing if data is undefined
We are testing 304 response at the moment and have run into an issue while mocking 304 responses with fixtures. We are in the process of trying to test this against a real server with a real 304 response.
In the fixture, we are resolving the response with data (eg. not an empty response) with a 304 status. However, jQuery does not pass this data along so that by the time can-connect gets the response, the data is undefined. In particular, instanceData is undefined in the fall-through-cache behavior, which then causes calls to updateData to fail when local-storage-cache tries to find the id prop.
@DesignByOnyx can you show me this tomorrow?
@justinbmeyer - I would need to set up a service to return a 304 response and see how can-connect handles it in isolation. We were using supermap and fixtures. I'll see if I can whip together a demo this evening.
@DesignByOnyx any chance to set this up?