提交 04561011 编写于 作者: C C. Morgan Hamill

Clean up conditional statement in `name` method.

Reverse the conditional order to avoid awkward `if !` construction.
上级 a45f7262
......@@ -65,10 +65,10 @@ module Gitlab
end
def name
if !auth.info.name.nil?
auth.info.name.to_s.force_encoding('utf-8')
else
if auth.info.name.nil?
"#{auth.info.first_name} #{auth.info.last_name}".force_encoding('utf-8')
else
auth.info.name.to_s.force_encoding('utf-8')
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册