Skip to content

Commit

Permalink
Merge pull request #62 from jordanbisato/master
Browse files Browse the repository at this point in the history
If response don't have a content, return null
  • Loading branch information
jasonkneen authored Feb 23, 2018
2 parents 8ce72fa + f5e551d commit 2997b9e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions reste.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ var main = function() {

methodCall(options, function(response) {

if ((response != null) && (response != undefined)) {
if (options.success && response[collectionConfig.content]) {

// check if we have a return property
Expand All @@ -505,6 +506,9 @@ var main = function() {
Alloy.Collections[collectionConfig.name].trigger("sync");
}
}
} else {
option.success(response);
}
}, function(response) {
if (options.error) {
options.error(response);
Expand Down

0 comments on commit 2997b9e

Please sign in to comment.