aboutsummaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/craftmine.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/craftmine.js b/js/craftmine.js
index 8af8296..608efb7 100644
--- a/js/craftmine.js
+++ b/js/craftmine.js
@@ -11,7 +11,8 @@ function sendRequest(url, params, callback) {
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr.onreadystatechange = function() {
if(xhr.readyState == XMLHttpRequest.DONE && xhr.status == "200") {
- var data = JSON.parse(xhr.responseText);
+ var data = "";
+ if(xhr.responseText) data = JSON.parse(xhr.responseText);
if(data.info)
showInfo(data.info);
if(data.error) {