summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-07-01 13:05:14 +0200
committerPeter Kozak <spag@golwen.net>2013-07-01 13:05:14 +0200
commit06e4c7c24e521a825a46b5fa7f3684ed3c23ce5f (patch)
tree0848a93bd541990f17a071c50c4ad846902a5437 /app/controllers
parent6ae8daa7c11a50a5fc538376158ee74f31d690b3 (diff)
@last_fax_document can be nil
Diffstat (limited to 'app/controllers')
-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( '* ' , '');")