       @requireLogin cb
 
   submitEmailAddresses: ->
-    @emailAddressSubmit.showLoader()
     emails = @emailAddressInput.getValue().split "\n"
     emails = emails.filter (email) -> email.length > 0
 
+    unless emails.length
+      @emailAddressSubmit.hideLoader()
+      return
+
     fails = []
 
+    @emailAddressSubmit.showLoader()
     async.map emails, (email, callback) ->
       KD.remote.api.JReferrableEmail.invite email, (err) ->
         fails.push email if err

      placeholder : "Type one email address per line"

    @emailAddressSubmit = new KDButtonView
      style    : "submit-email-addresses"
      title    : "Send"
      loader   : yes
      callback    : =>
        @emailAddressSubmit.hideLoader()
        if @emailAddressInput.getValue() is ""

    , =>
      @errorMessage.hide()
      @emailAddressSubmit.hideLoader()

      if fails.length
        @decorateEmailAddressError fails
      else
        @emailAddressSubmit.hide()
        @invitationSentButton.show()


  enable: ->
    return  unless KD.isLoggedIn()
