Skip to content

Commit

Permalink
Fallback to site_hostname when site_title is empty (mastodon#4394)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykzts authored and Gargron committed Jul 27, 2017
1 parent 5bf4838 commit bb96ba1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/helpers/instance_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module InstanceHelper
def site_title
Setting.site_title.to_s
Setting.site_title.presence || site_hostname
end

def site_hostname
Expand Down
2 changes: 1 addition & 1 deletion spec/helpers/instance_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
it 'returns empty string when Setting.site_title is nil' do
Setting.site_title = nil

expect(helper.site_title).to eq ''
expect(helper.site_title).to eq 'cb6e6126.ngrok.io'
end
end

Expand Down

0 comments on commit bb96ba1

Please sign in to comment.