Skip to content

Commit

Permalink
fix(api): module callback function typo
Browse files Browse the repository at this point in the history
  • Loading branch information
TATSUNO Yasuhiro authored and Sean committed May 7, 2019
1 parent 7b89336 commit 43c2c8b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/definitions/behaviors/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ $.api = $.fn.api = function(parameters) {
return (module.cancelled || false);
},
succesful: function() {
module.verbose('This behavior will be deleted due to typo. Use "was successful" instead.');
return module.was.successful();
},
successful: function() {
return (module.request && module.request.state() == 'resolved');
},
failure: function() {
Expand Down Expand Up @@ -548,7 +552,7 @@ $.api = $.fn.api = function(parameters) {
response
;
// have to guess callback parameters based on request success
if( module.was.succesful() ) {
if( module.was.successful() ) {
response = firstParameter;
xhr = secondParameter;
}
Expand Down

0 comments on commit 43c2c8b

Please sign in to comment.