canjs / can-connect

Model layer utilities for every JavaScript framework! Assemble real-time, high performance, restful data connections.
https://canjs.com/doc/can-connect.html
MIT License
29 stars 16 forks source link

Warn if data does not contain id prop #364

Closed DesignByOnyx closed 6 years ago

DesignByOnyx commented 6 years ago

I am working on a feathers app, and the server dispatched a "created" event over sockets. The event made it to the browser and then there was an error on this line:

https://github.com/canjs/can-connect/blob/master/can/map/map.js#L803

Cannot use 'in' operator to search for '__get' in undefined

Turns out I had forgotten to configure the idProp for my connection. Once I added it the error went away. However, there was zero indication as to why I was getting the error.

DesignByOnyx commented 6 years ago

The line in reference has moved, and I cannot remember exactly what caused this. Closing until it happens again.