Merge branch 'master' of github.com:codegefluester/parse-server

This commit is contained in:
Björn Kaiser
2016-02-03 20:52:35 +00:00
3 changed files with 43 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ function handleCloudFunction(req) {
if (Parse.Cloud.Functions[req.params.functionName]) {
// Run the validator for this function first
if (Parse.Cloud.Validators[req.params.functionName]) {
var result = Parse.Cloud.Validators[req.params.functionName](req.body);
var result = Parse.Cloud.Validators[req.params.functionName](req.body || {});
if (!result) {
throw new Parse.Error(Parse.Error.SCRIPT_FAILED, 'Validation failed.');
}