From 000e0e339fe30af8652361a34a9e35a507e1f9b4 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sat, 11 Nov 2017 17:10:05 +0100 Subject: Revert "fix invalid JSON fix" This reverts commit 527e3e851b0e356db8a4c88d8f48efb0ea702768. --- worker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker.js b/worker.js index 91f39be..e58c426 100644 --- a/worker.js +++ b/worker.js @@ -147,7 +147,7 @@ amqp.connect(RABBITMQ_URI).then(async (rabbit) => { if (!response.body.startsWith("[")) { // invalid JSON // https://github.com/gamelocker/vainglory-assets/issues/325 - let hotfix = response.body.replace(/\{\s+"time":/g, ', { "time":'); + let hotfix = response.body.replace(/\{ "time":/g, ', { "time":'); // `},` -> `} \n ]` hotfix = "[" + hotfix.substring(2, hotfix.length) + "]"; response.body = JSON.parse(hotfix); -- cgit v1.3.1