Skip to content

Commit

Permalink
refactor LanguageExtractor
Browse files Browse the repository at this point in the history
  • Loading branch information
soneda-yuya committed Jan 12, 2025
1 parent cc347cf commit 0824a31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/internal/app/lang.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func LanguageExtractor(req *http.Request) string {
// if user language is not "und", use user language
// if user language is "und", use browser language
u := adapter.User(req.Context())
if u != nil && u.Lang().String() != "und" {
if u != nil && !u.Lang().IsRoot() {
lang = u.Lang().String()
}

Expand Down

0 comments on commit 0824a31

Please sign in to comment.