mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
feat: fix bug that organization might be nil in some case and cause nil point error (#3608)
This commit is contained in:
parent
f26b4853c5
commit
24ab8880cc
@ -106,11 +106,14 @@ func getOrganizationThemeCookieFromUrlPath(ctx *context.Context, urlPath string)
|
||||
}
|
||||
|
||||
organizationThemeCookie := &OrganizationThemeCookie{
|
||||
application.ThemeData,
|
||||
application.Logo,
|
||||
application.FooterHtml,
|
||||
organization.Favicon,
|
||||
organization.DisplayName,
|
||||
ThemeData: application.ThemeData,
|
||||
LogoUrl: application.Logo,
|
||||
FooterHtml: application.FooterHtml,
|
||||
}
|
||||
|
||||
if organization != nil {
|
||||
organizationThemeCookie.Favicon = organization.Favicon
|
||||
organizationThemeCookie.DisplayName = organization.DisplayName
|
||||
}
|
||||
|
||||
return organizationThemeCookie, nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user