Skip to content

Commit

Permalink
Fix JSON-Parse errors. Now default telemachus page won't fall.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsolmann authored Apr 13, 2019
1 parent e3b23bc commit 844be0f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions WebPages/WebPages/src/js/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,9 @@
}, "json").then((function(_this) {
return function(data, textStatus, jqXHR) {
var api, i, k, l, len, len1, n, r, ref, ref1, ref2, resourceApi;
ref = JSON.parse(data).api;
console.log(data.api);
//ref = JSON.parse(data).api;
ref = data.api;
for (k = 0, len = ref.length; k < len; k++) {
api = ref[k];
if (api.apistring.match(/^b\./)) {
Expand Down Expand Up @@ -492,7 +494,7 @@
return function(data, textStatus, jqXHR) {
var error, value;
try {
data = JSON.parse(data);
// console.log(data);
} catch (error1) {
error = error1;
_this.$alertSubscribers.trigger("telemetryAlert", ["Bad Data"]);
Expand Down

0 comments on commit 844be0f

Please sign in to comment.