Skip to content

Commit e9e561f

Browse files
simonas-notcatflovilmart
authored andcommitted
Removing sessionToken and authData from _User objects included in a query (#1450)
* Removing sessionToken and authData from _User objects included in a query This bug caused sessionToken to be replaced on client side to some old sessionToken from DB. * Removing dangling variable that is never used
1 parent 73a3db4 commit e9e561f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/RestQuery.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,6 @@ function includePath(config, auth, response, path) {
450450
return response;
451451
}
452452
let pointersHash = {};
453-
var className = null;
454453
var objectIds = {};
455454
for (var pointer of pointers) {
456455
let className = pointer.className;
@@ -477,8 +476,9 @@ function includePath(config, auth, response, path) {
477476
obj.__type = 'Object';
478477
obj.className = includeResponse.className;
479478

480-
if(className == "_User"){
479+
if (obj.className == "_User") {
481480
delete obj.sessionToken;
481+
delete obj.authData;
482482
}
483483
replace[obj.objectId] = obj;
484484
}

0 commit comments

Comments
 (0)