From 1ed49792565296730acf57332d72a48df01c7092 Mon Sep 17 00:00:00 2001
From: "Herfort, Thomas" <Thomas.Herfort@br.de>
Date: Wed, 16 Jan 2019 10:01:46 +0000
Subject: [PATCH] index.js aktualisiert

---
 index.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/index.js b/index.js
index 0bf88a1..e0aad2e 100644
--- a/index.js
+++ b/index.js
@@ -71,7 +71,7 @@ function Log (options) {
   }
   this.log = function (tag, message, tags) {
     let tadd = ''
-    if (typeof tags !== 'undefined') {
+    if (typeof tags !== 'undefined' && typeof tags === 'string') {
       if (Array.isArray(tags)) {
         tadd = ' #' + tags.join(' #')
       } else if (tags.includes(' ')) {
@@ -81,7 +81,8 @@ function Log (options) {
       } else {
         tadd = ' #' + tags
       }
-    }
+    } else { tadd = tags}
+    
     let msg = this.getDate() + '\t' + this.hostname + '\t' + this.name + '\t' + tag + '\t' + message + tadd
     switch (tag) {
       case 'INFO':
-- 
GitLab