Skip to content

Commit 9ab69c3

Browse files
committed
3.0.0-alpha.2
1 parent 6b6ed72 commit 9ab69c3

File tree

6 files changed

+15
-10
lines changed

6 files changed

+15
-10
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
##### 3.0.0-alpha.2 - 26 February 2016
2+
3+
###### Backwards compatible bug fixes
4+
- Fixed edge case with returnDeletedIds
5+
16
##### 3.0.0-alpha.1 - 26 February 2016
27

38
###### Breaking API changes

CONTRIBUTORS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
# Names should be added to this file as:
66
# [commit count] Name <email address>
77
1 InternalFX <bryan@internalfx.com>
8-
39 Jason Dobry <jason.dobry@gmail.com>
8+
43 Jason Dobry <jason.dobry@gmail.com>
99
2 Ollie Relph <ollie@relph.me>

dist/js-data-rethinkdb.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js-data-rethinkdb.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "js-data-rethinkdb",
33
"description": "RethinkDB adapter for js-data.",
4-
"version": "3.0.0-alpha.1",
4+
"version": "3.0.0-alpha.2",
55
"homepage": "https://github.com/js-data/js-data-rethinkdb",
66
"repository": {
77
"type": "git",
@@ -59,7 +59,7 @@
5959
"babel-preset-stage-0": "6.5.0",
6060
"chai": "3.5.0",
6161
"codacy-coverage": "1.1.3",
62-
"coveralls": "2.11.6",
62+
"coveralls": "2.11.8",
6363
"ink-docstrap": "1.1.2",
6464
"istanbul": "0.4.2",
6565
"js-data-adapter-tests": "^2.0.0-alpha.7",

src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -552,17 +552,17 @@ addHiddenPropsToTarget(RethinkDBAdapter.prototype, {
552552
return self.selectTable(mapper, opts).get(id).delete().run()
553553
}).then(function (cursor) {
554554
let deleted = 0
555-
if (cursor && cursor.deleted) {
555+
if (cursor && cursor.deleted && returnDeletedIds) {
556556
deleted = cursor.deleted
557557
}
558558
// afterDestroy lifecycle hook
559559
op = opts.op = 'afterDestroy'
560560
return resolve(self[op](mapper, id, opts, deleted ? id : undefined)).then(function (_id) {
561561
// Allow for re-assignment from lifecycle hook
562-
id = isUndefined(_id) && returnDeletedIds ? id : _id
562+
id = isUndefined(_id) && deleted ? id : _id
563563
const result = {}
564564
fillIn(result, cursor)
565-
result.data = deleted ? id : undefined
565+
result.data = id
566566
return self.getRaw(opts) ? result : result.data
567567
})
568568
})

0 commit comments

Comments
 (0)