File tree Expand file tree Collapse file tree 4 files changed +13
-9
lines changed Expand file tree Collapse file tree 4 files changed +13
-9
lines changed Original file line number Diff line number Diff line change 1+ ##### 3.0.0-rc.3 - 17 October 2016
2+
3+ ###### Bug fixes
4+ - Fixed update throwing error when record was unchanged.
5+
16##### 3.0.0-rc.2 - 23 August 2016
27
38###### Backwards compatible changes
Original file line number Diff line number Diff line change 1- /*global assert:true */
21'use strict'
32
43// prepare environment for js-data-adapter-tests
Original file line number Diff line number Diff line change 11{
22 "name" : " js-data-rethinkdb" ,
33 "description" : " RethinkDB adapter for js-data." ,
4- "version" : " 3.0.0-rc.2 " ,
4+ "version" : " 3.0.0-rc.3 " ,
55 "homepage" : " https://github.com/js-data/js-data-rethinkdb" ,
66 "repository" : {
77 "type" : " git" ,
6363 "mout" : " 1.0.0"
6464 },
6565 "peerDependencies" : {
66- "js-data" : " ^3.0.0-rc.4 " ,
66+ "js-data" : " ^3.0.0-rc.6 " ,
6767 "rethinkdbdash" : " >=2.0.0"
6868 },
6969 "devDependencies" : {
70- "js-data-repo-tools" : " 0.5.6 "
70+ "js-data-repo-tools" : " 0.5.7 "
7171 }
7272}
Original file line number Diff line number Diff line change @@ -414,14 +414,14 @@ Adapter.extend({
414414 . update ( props , updateOpts )
415415 . run ( this . getOpt ( 'runOpts' , opts ) )
416416 . then ( ( cursor ) => {
417- let record
418417 this . _handleErrors ( cursor )
419- if ( cursor && cursor . changes && cursor . changes . length && cursor . changes [ 0 ] . new_val ) {
420- record = cursor . changes [ 0 ] . new_val
421- } else {
418+ if ( cursor . skipped ) {
422419 throw new Error ( 'Not Found' )
420+ } else if ( cursor && cursor . changes && cursor . changes . length && cursor . changes [ 0 ] . new_val ) {
421+ return [ cursor . changes [ 0 ] . new_val , cursor ]
422+ } else {
423+ return this . _find ( mapper , id , opts )
423424 }
424- return [ record , cursor ]
425425 } )
426426 } ,
427427
You can’t perform that action at this time.
0 commit comments