diff --git a/reste.js b/reste.js index 18da5f6..d8bb713 100644 --- a/reste.js +++ b/reste.js @@ -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 @@ -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);