 
   handlePackageEvents: ->
     @subscribe @packageManager, 'package-installed package-install-failed theme-installed theme-install-failed', (pack, error) =>
-      if pack.name == @pack.name
-        if error
+      if pack.name is @pack.name
+        if error?
           @setStatusIcon('alert')
           @installButton.prop('disabled', false)
         else

          @installButton.text('Installed')

    @subscribe @packageManager, 'package-installing', (pack) =>
      if pack.name == @pack.name
        @installButton.prop('disabled', true)
        @setStatusIcon('cloud-download')


      @packageManager.emit('package-installing', @pack)

      @packageManager.install @pack, (error) =>
        if error?
          console.error("Installing #{@type} #{@pack.name} failed", error.stack ? error, error.stderr)

    @learnMoreButton.on 'click', =>
