From 9087a79c5b0f0b7e92e8ecc7abf6e081abcd041a Mon Sep 17 00:00:00 2001
From: Anton Vakhrushev <anwinged@ya.ru>
Date: Wed, 6 May 2020 10:12:55 +0300
Subject: [PATCH] Small fixes

---
 src/TaskQueueRenderer.ts | 6 +-----
 src/index.js             | 1 +
 src/utils.ts             | 3 ++-
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/TaskQueueRenderer.ts b/src/TaskQueueRenderer.ts
index de2ea90..8546484 100644
--- a/src/TaskQueueRenderer.ts
+++ b/src/TaskQueueRenderer.ts
@@ -23,11 +23,7 @@ export class TaskQueueRenderer {
                 'padding': '8px 6px',
             });
         tasks.forEach(task => {
-            ul.append(
-                jQuery('<li></li>').text(
-                    formatDate(task.ts) + ' ' + task.name + ' ' + JSON.stringify(task.args) + ' ' + task.id
-                )
-            );
+            ul.append(jQuery('<li></li>').text(formatDate(task.ts) + ' ' + task.name + ' ' + task.id));
         });
 
         const el = jQuery(`#${ID}`);
diff --git a/src/index.js b/src/index.js
index 4cbd0be..59302b4 100644
--- a/src/index.js
+++ b/src/index.js
@@ -26,5 +26,6 @@ function main() {
 try {
     main();
 } catch (e) {
+    console.error('Main func error', e);
     setTimeout(() => location.reload(), 5000);
 }
diff --git a/src/utils.ts b/src/utils.ts
index 2fbf97f..df55519 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -11,7 +11,8 @@ function randomInRange(from: number, to: number): number {
 }
 
 export async function sleepMicro() {
-    return await sleep(randomInRange(1500, 2500));
+    const timeInMs = randomInRange(1500, 2500);
+    return await sleep(timeInMs);
 }
 
 export function aroundMinutes(minutes: number) {