Skip to content

Commit

Permalink
Fix bot mute button handler NPE on reload
Browse files Browse the repository at this point in the history
Can mean we get title colliding with fancy mouseover because bootstrap doesn't check for them being dynamic.
  • Loading branch information
Torgen committed Jan 17, 2019
1 parent 5ad89b8 commit eb913eb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client/header.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,11 @@ Template.header_loginmute.helpers
if 'true' is reactiveLocalStorage.getItem 'nobot' then 'icon-bot-off' else 'icon-bot-on'
connectStatus: Meteor.status
botTitle: ->
botName = botuser()?.nickname or 'The bot'
if 'true' is reactiveLocalStorage.getItem 'nobot'
"#{botuser().nickname} promises not to bother you"
"#{botName} promises not to bother you"
else
"#{botuser().nickname} is feeling chatty!"
"#{botName} is feeling chatty!"
sessionNick: -> # TODO(torgen): replace with currentUser
user = Meteor.user()
return unless user?
Expand Down

0 comments on commit eb913eb

Please sign in to comment.