]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.js
gitweb: Protect escaping functions against calling on undef
[Gitweb] / gitweb.js
index 0c0b6a6b2c10ce278bec52f1edcd46a79ec7f397ed35c5e31ad819cb352e1b7b..1f77d37887e350d2dba636fed0fd5a45489cca78d0c572be8ce397314eb3277e 100644 (file)
--- a/gitweb.js
+++ b/gitweb.js
@@ -779,7 +779,12 @@ function handleResponse() {
        }
 
        // the server returned error
        }
 
        // the server returned error
-       if (xhr.readyState === 3 && xhr.status !== 200) {
+       // try ... catch block is to work around bug in IE8
+       try {
+               if (xhr.readyState === 3 && xhr.status !== 200) {
+                       return;
+               }
+       } catch (e) {
                return;
        }
        if (xhr.readyState === 4 && xhr.status !== 200) {
                return;
        }
        if (xhr.readyState === 4 && xhr.status !== 200) {
This page took 0.196634 seconds and 4 git commands to generate.