Github
This repository
This repository
All repositories
Browse code

Makes the code a little more readable while saving 1 byte. Per @gibso…

  • Loading branch information...
commit 4fb9768cc5a52e8c16c515bf1bd27332f8043526 1 parent c0c38ad
authored

Showing 1 changed file with 5 additions and 2 deletions. Show Diff Stats Hide Diff Stats

  1. 7  src/ajax.js
7  src/ajax.js
... ... @@ -776,8 +776,10 @@ function ajaxConvert( s, response, jqXHR, isSuccess ) {
776 776      }
777 777    }
778 778  
  779 +  current = dataTypes.shift();
  780 +
779 781    // Convert to each sequential dataType
780   -  for ( current = dataTypes.shift(); current; ) {
  782 +  while ( current ) {
781 783  
782 784      if ( s.responseFields[ current ] ) {
783 785        jqXHR[ s.responseFields[ current ] ] = response;
... ... @@ -789,8 +791,9 @@ function ajaxConvert( s, response, jqXHR, isSuccess ) {
789 791      }
790 792  
791 793      prev = current;
  794 +    current = dataTypes.shift();
792 795  
793   -    if ( ( current = dataTypes.shift() ) ) {
  796 +    if ( current ) {
794 797  
795 798        // There's only work to do if current dataType is non-auto
796 799        if ( current === "*" ) {

0 notes on commit 4fb9768

Please sign in to comment.
Something went wrong with that request. Please try again.