andrewmcgivery / angular-soap

An angular port of a Javascript SOAP Client into a factory that has a similar syntax to $http.
114 stars 84 forks source link

Error when soapCallback is null #28

Closed gtsopour closed 8 years ago

gtsopour commented 8 years ago

Probable this

//Create Callback
var soapCallback = function(e){
    if(e.constructor.toString().indexOf("function Error()") != -1){
        deferred.reject("An error has occurred.");
    } else {
        deferred.resolve(e);
    }
}

should be changed to

//Create Callback
var soapCallback = function(e){
    if(e == null || e.constructor.toString().indexOf("function Error()") != -1){
        deferred.reject("An error has occurred.");
    } else {
        deferred.resolve(e);
    }
}

Best George

andrewmcgivery commented 8 years ago

Thanks :)