From 844be0fcca77e848347d3d42e44e1da5368cce04 Mon Sep 17 00:00:00 2001 From: Daniel G <19241189+DanGSun@users.noreply.github.com> Date: Sat, 13 Apr 2019 22:58:37 +0300 Subject: [PATCH] Fix JSON-Parse errors. Now default telemachus page won't fall. --- WebPages/WebPages/src/js/console.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/WebPages/WebPages/src/js/console.js b/WebPages/WebPages/src/js/console.js index 1a8a4b5..542e0d2 100644 --- a/WebPages/WebPages/src/js/console.js +++ b/WebPages/WebPages/src/js/console.js @@ -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\./)) { @@ -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"]);