summaryrefslogtreecommitdiff
path: root/app/controllers/trigger_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/trigger_controller.rb')
-rw-r--r--app/controllers/trigger_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/trigger_controller.rb b/app/controllers/trigger_controller.rb
index 290a1fc..ee4ddca 100644
--- a/app/controllers/trigger_controller.rb
+++ b/app/controllers/trigger_controller.rb
@@ -178,7 +178,7 @@ class TriggerController < ApplicationController
if errors.count == 0
# Indicate a new fax in the navigation bar.
#
- if @last_fax_document.fax_account.fax_accountable.class == User
+ if @last_fax_document && @last_fax_document.fax_account.fax_accountable.class == User
user = @last_fax_document.fax_account.fax_accountable
PrivatePub.publish_to("/users/#{user.id}/messages/new", "$('#new_voicemail_or_fax_indicator').hide('fast').show('slow');")
PrivatePub.publish_to("/users/#{user.id}/messages/new", "document.title = '* ' + document.title.replace( '* ' , '');")