精简代码

This commit is contained in:
gouguoyin 2021-07-19 09:55:07 +08:00
parent 82ed3c264c
commit 4c1c004f09

View File

@ -10,8 +10,8 @@ func (c Carbon) Season() string {
if c.IsZero() {
return ""
}
if len(c.Lang.resources) == 0 && c.Lang.SetLocale(defaultLocale) != nil {
return ""
if len(c.Lang.resources) == 0 {
c.Lang.SetLocale(defaultLocale)
}
index := -1
switch {