From f01cc4cf9c64592a3d0c7a6151d2838b4a5f83c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastian=20K=C3=BCppers?= <bastian@bastian-kueppers.de>
Date: Tue, 14 Feb 2017 20:36:42 +0100
Subject: [PATCH] Update index.js

Updated a few minor things.
---
 index.js | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/index.js b/index.js
index 3089b47..c18734e 100644
--- a/index.js
+++ b/index.js
@@ -38,7 +38,7 @@ class TabGroup extends EventEmitter {
             viewClass: args.viewClass || "etabs-view",
             closeButtonText: args.closeButtonText || "&#10006;",
             newTab: args.newTab,
-            newTabButtonText: args.newTabButton || "&#65291;",
+            newTabButtonText: args.newTabButtonText || "&#65291;",
             ready: args.ready
         };
         this.tabContainer = document.querySelector(options.tabContainerSelector);
@@ -163,11 +163,12 @@ class Tab extends EventEmitter {
         let span = this.tabElements.icon;
         if (iconURL) {
             span.innerHTML = `<img src="${iconURL}" />`;
-		} else if (icon) {
-				span.innerHTML = `<i class="fa ${icon}"></i>`;
-		}
-
-        this.emit("icon-changed", iconURL, this);
+	    this.emit("icon-changed", iconURL, this);
+	} else if (icon) {
+	    span.innerHTML = `<i class="fa ${icon}"></i>`;
+	    this.emit("icon-changed", icon, this);
+	}
+	    
         return this;
     }