[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant-frontends] branch master updated: Avoid che
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant-frontends] branch master updated: Avoid checking two conditions within one 'if' concerning XHR object. |
Date: |
Tue, 14 Mar 2017 14:18:06 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository merchant-frontends.
The following commit(s) were added to refs/heads/master by this push:
new 901b28c Avoid checking two conditions within one 'if' concerning XHR
object.
901b28c is described below
commit 901b28cbb7a5fac8c42b7d3b924a61b4d3df54b4
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Mar 14 14:17:31 2017 +0100
Avoid checking two conditions within one 'if' concerning
XHR object.
---
talerfrontends/blog/static/backoffice.js | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/talerfrontends/blog/static/backoffice.js
b/talerfrontends/blog/static/backoffice.js
index d05eb22..1041221 100644
--- a/talerfrontends/blog/static/backoffice.js
+++ b/talerfrontends/blog/static/backoffice.js
@@ -174,8 +174,6 @@ function track_order(order_id, instance){
toggle_overlay();
}
}
-
- // Manage here 202 case (tracks not ready).
}
req.send();
}
@@ -239,16 +237,18 @@ function get_history(scroll){
var req = new XMLHttpRequest();
req.open("GET",
`/history?timestamp=${TIMESTAMP}&instance=${INSTANCE}&start=${START}`, true);
req.onload = function(){
- if(req.readyState == 4 && req.status == 200){
- var history = JSON.parse(req.responseText);
- if(!history){
- console.log("Got invalid JSON");
- return;
+ if(4 == req.readyState){
+ if(200 == req.status){
+ var history = JSON.parse(req.responseText);
+ if(!history){
+ console.log("Got invalid JSON");
+ return;
+ }
+ fill_table(history);
+ }
+ else{
+ console.log("error: status != 200");
}
- fill_table(history);
- }
- else{
- console.log("error: status != 200");
}
}
req.send();
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-merchant-frontends] branch master updated: Avoid checking two conditions within one 'if' concerning XHR object.,
gnunet <=