Closed
Description
Sending query for a relationship that has not yet registered field, it will crash the server :
Promise.resolve()
.then(()=>{
var object = new Parse.Object('TestObject');
object.set('name','Named');
return object.save()
.then(function (rez) {
var query =rez.relation('users').query();
return query.find()
.then((users)=>{
console.log(users);
},(err)=>{
console.error(err);
});
});
})
It will crash with error :
Uncaught internal server error. [TypeError: Cannot read property 'match' of undefined] TypeError: Cannot read property 'match' of undefined
at [...]/parse-server/ExportAdapter.js:108:18
at process._tickDomainCallback (node.js:444:9)
To fix, I think that line 108 should be :
var match = t ? t.match(/^relation<(.*)>$/) : false;
(as it is in similar function reduceInRelation )
Metadata
Metadata
Assignees
Labels
No labels