Skip to content

Commit 59b5d07

Browse files
committed
Makes sure the location in results has the proper objectId
1 parent d6af77b commit 59b5d07

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/RestWrite.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,12 @@ RestWrite.prototype.handleAuthData = function(authData) {
285285
// Login with auth data
286286
// Short circuit
287287
delete results[0].password;
288+
// need to set the objectId first otherwise location has trailing undefined
289+
this.data.objectId = results[0].objectId;
288290
this.response = {
289291
response: results[0],
290292
location: this.location()
291293
};
292-
this.data.objectId = results[0].objectId;
293294
} else if (this.query && this.query.objectId) {
294295
// Trying to update auth data but users
295296
// are different

0 commit comments

Comments
 (0)