Code

gitweb.js: No need for loop in blame_incremental's handleResponse()
[git.git] / gitweb / static / js / blame_incremental.js
index 4841805288962d656e7e8aacef83738bd5c51b9a..27955ecd3786a1dee447e91d0f7ff4bb0bfcb189 100644 (file)
@@ -603,21 +603,16 @@ function handleResponse() {
                return;
        }
 
-       // extract new whole (complete) lines, and process them
-       while (xhr.prevDataLength !== xhr.responseText.length) {
-               if (xhr.readyState === 4 &&
-                   xhr.prevDataLength === xhr.responseText.length) {
-                       break;
-               }
 
+       // extract new whole (complete) lines, and process them
+       if (xhr.prevDataLength !== xhr.responseText.length) {
                xhr.prevDataLength = xhr.responseText.length;
                var unprocessed = xhr.responseText.substring(xhr.nextReadPos);
                xhr.nextReadPos = processData(unprocessed, xhr.nextReadPos);
-       } // end while
+       }
 
        // did we finish work?
-       if (xhr.readyState === 4 &&
-           xhr.prevDataLength === xhr.responseText.length) {
+       if (xhr.readyState === 4) {
                responseLoaded(xhr);
        }
 }