rethinkdb / rethinkdb-example-nodejs

137 stars 98 forks source link

Handle empty new_val and the fact that it's an array #14

Closed danielmewes closed 8 years ago

danielmewes commented 9 years ago

This was pointed out by @anthonyettinger in https://github.com/rethinkdb/rethinkdb-example-nodejs/pull/13/files#r30754551

I believe it should be result.changes[0].new_val -- but i'm not sure of the impact of only looking at [0] and sometimes, there is no new_val property if there was no change (ie: they made the call but it was with identical data as what already was in the db.

I think he is right and we need to change that.

danielmewes commented 8 years ago

. @danyim addressed this for the angular-promise example with https://github.com/rethinkdb/rethinkdb-example-nodejs/pull/17

danielmewes commented 8 years ago

Also fixed for the Koa version with https://github.com/rethinkdb/rethinkdb-example-nodejs/commit/5e0cff3b6cc1916843e04777a3c58123a3a17632