Skip to content

Commit ba68acf

Browse files
committed
Merge pull request #476 from sdf611097/master
ExportAdapter destroy nothing will cause change password failed
2 parents 2e6173f + f271ac9 commit ba68acf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ExportAdapter.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,8 @@ ExportAdapter.prototype.destroy = function(className, query, options = {}) {
306306

307307
return coll.remove(mongoWhere);
308308
}).then((resp) => {
309-
if (resp.result.n === 0) {
309+
//Check _Session to avoid changing password failed without any session.
310+
if (resp.result.n === 0 && className !== "_Session") {
310311
return Promise.reject(
311312
new Parse.Error(Parse.Error.OBJECT_NOT_FOUND,
312313
'Object not found.'));

0 commit comments

Comments
 (0)