Module: check_mk
Branch: master
Commit: fed6cf8fdb93fbf4d88f92e8f37710536b4fad2a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fed6cf8fdb93fb…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jun 29 10:19:23 2011 +0200
Multisite javascript ajax: Sauberere Fehlerbehandlung
---
web/htdocs/js/wato.js | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/web/htdocs/js/wato.js b/web/htdocs/js/wato.js
index dfeab39..1779d93 100644
--- a/web/htdocs/js/wato.js
+++ b/web/htdocs/js/wato.js
@@ -101,14 +101,12 @@ function progress_handle_response(data, code) {
var header = null;
try {
var header = eval(code.split("\n", 1)[0]);
+ if (header === null)
+ alert('Header is null!');
} catch(err) {
alert('Invalid response: ' + code);
}
- if (header === null) {
- alert('Header is null!');
- }
-
// Extract the body from the response
var body = code.split('\n');
body.splice(0,1);