From b481f15492242a01db812a784944145eaa7900d9 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Wed, 3 Feb 2016 09:20:40 -0800 Subject: [PATCH] lint(tray): Fix "new Number" not allowed --- internal_packages/system-tray/lib/tray-store.es6 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal_packages/system-tray/lib/tray-store.es6 b/internal_packages/system-tray/lib/tray-store.es6 index 91337cb2e..a1a945fdb 100644 --- a/internal_packages/system-tray/lib/tray-store.es6 +++ b/internal_packages/system-tray/lib/tray-store.es6 @@ -47,7 +47,7 @@ class TrayStore extends NylasStore { this._platform = platform; this._unreadIcon = NativeImage.createFromPath(UNREAD_ICON_PATH); - this._unreadString = new Number(UnreadBadgeStore.count()).toLocaleString(); + this._unreadString = UnreadBadgeStore.count().toLocaleString(); this._baseIcon = NativeImage.createFromPath(BASE_ICON_PATH); this._menu = _buildMenu(); this._icon = this._getIconImg(); @@ -83,7 +83,7 @@ class TrayStore extends NylasStore { return out2x; }, 'default': ()=> { - return this._unreadString != '0' ? this._unreadIcon : this._baseIcon; + return this._unreadString !== '0' ? this._unreadIcon : this._baseIcon; }, }; @@ -91,7 +91,7 @@ class TrayStore extends NylasStore { } _onUnreadCountChanged() { - this._unreadString = new Number(UnreadBadgeStore.count()).toLocaleString(); + this._unreadString = UnreadBadgeStore.count().toLocaleString(); this._icon = this._getIconImg(); this.trigger(); }