mirror of
https://github.com/kikobar/mastodon.git
synced 2024-12-24 14:54:13 +00:00
Fallback to site_hostname when site_title is empty (#4394)
This commit is contained in:
parent
5bf4838e2f
commit
bb96ba13cf
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
module InstanceHelper
|
module InstanceHelper
|
||||||
def site_title
|
def site_title
|
||||||
Setting.site_title.to_s
|
Setting.site_title.presence || site_hostname
|
||||||
end
|
end
|
||||||
|
|
||||||
def site_hostname
|
def site_hostname
|
||||||
|
|
|
@ -19,7 +19,7 @@ describe InstanceHelper do
|
||||||
it 'returns empty string when Setting.site_title is nil' do
|
it 'returns empty string when Setting.site_title is nil' do
|
||||||
Setting.site_title = nil
|
Setting.site_title = nil
|
||||||
|
|
||||||
expect(helper.site_title).to eq ''
|
expect(helper.site_title).to eq 'cb6e6126.ngrok.io'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue