From 3780eb8f50519d29b191512b312bf570ed8cab64 Mon Sep 17 00:00:00 2001 From: Lazar Obradovic Date: Sat, 10 Mar 2018 20:55:20 +0100 Subject: [PATCH] Making Codacy happy. --- code/html/custom.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/code/html/custom.js b/code/html/custom.js index ba127825..90242c00 100644 --- a/code/html/custom.js +++ b/code/html/custom.js @@ -1252,11 +1252,10 @@ function connect(host) { if (websock) { websock.close(); } websock = new WebSocket(wshost); websock.onmessage = function(evt) { - var data = getJson(evt.data - .replace(/\n/g, "\\n") - .replace(/\r/g, "\\r") - .replace(/\t/g, "\\t")); - if (data) { processData(data); } + var data = getJson(evt.data.replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\t/g, "\\t")); + if (data) { + processData(data); + } }; }