flipace / lovli.js

A boilerplate for developing react+redux applications with rethinkdb/horizon as realtime database and express for the server.
MIT License
558 stars 35 forks source link

Uncaught Error: Object field '$hz_v$' may not be undefined #5

Closed torybriggs closed 8 years ago

torybriggs commented 8 years ago

This error surfaces when trying to delete a todo item that has been automatically created by the server. Todos created from the web input form seem unaffected.

Everything was working properly until I reduced the interval at which automatic todos were created. I set the interval to 1 second to see how the system would be respond to a large number of todos being created.

It seems the $hz_v$ field may be something automatically generated by Horizon. Since todos generated on the server use rethinkdbdash instead of Horizon, there may be a discrepancy in which fields are required.

torybriggs commented 8 years ago

Example todo item created through Horizon from the client:

{
    "$hz_v$": 0,
    "id": "db5808ee-dc91-45a7-8388-b763987b4a52",
    "text": "A new todo"
}

Versus todo item created through rethinkdbdash on the server:

{
    "id": "e84b50fc-1b22-48d4-a1bc-a24e9b68100e",
    "text": "Wash the dishes."
}

Screenshot from the RethinkDB Data Explorer http://d.pr/i/TBWP/5Xeusbnv

flipace commented 8 years ago

this is temporarily fixed, thanks to #10 from @haukurk