Skip to content

Commit 8c9b474

Browse files
yuzehRafael Santos
authored andcommitted
don't serve null authData values (parse-community#2320)
1 parent cbda60c commit 8c9b474

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/RestQuery.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,17 @@ RestQuery.prototype.runFind = function() {
394394
if (this.className === '_User') {
395395
for (var result of results) {
396396
delete result.password;
397+
398+
if (result.authData) {
399+
Object.keys(result.authData).forEach((provider) => {
400+
if (result.authData[provider] === null) {
401+
delete result.authData[provider];
402+
}
403+
});
404+
if (Object.keys(result.authData).length == 0) {
405+
delete result.authData;
406+
}
407+
}
397408
}
398409
}
399410

0 commit comments

Comments
 (0)