diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-11-11 17:09:20 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-11-11 17:09:20 +0100 |
| commit | 527e3e851b0e356db8a4c88d8f48efb0ea702768 (patch) | |
| tree | 2a14046856d014a9ad4635e291953dcfc900095c | |
| parent | d8bf0a949c9badd2ecb31c92f555069149f4cfd1 (diff) | |
| download | telesucker-527e3e851b0e356db8a4c88d8f48efb0ea702768.tar.gz telesucker-527e3e851b0e356db8a4c88d8f48efb0ea702768.zip | |
fix invalid JSON fix
| -rw-r--r-- | worker.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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(/\{ "time":/g, ', { "time":'); + let hotfix = response.body.replace(/\{\s+"time":/g, ', { "time":'); // `},` -> `} \n ]` hotfix = "[" + hotfix.substring(2, hotfix.length) + "]"; response.body = JSON.parse(hotfix); |
