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{
|
organizationThemeCookie := &OrganizationThemeCookie{
|
||||||
application.ThemeData,
|
ThemeData: application.ThemeData,
|
||||||
application.Logo,
|
LogoUrl: application.Logo,
|
||||||
application.FooterHtml,
|
FooterHtml: application.FooterHtml,
|
||||||
organization.Favicon,
|
}
|
||||||
organization.DisplayName,
|
|
||||||
|
if organization != nil {
|
||||||
|
organizationThemeCookie.Favicon = organization.Favicon
|
||||||
|
organizationThemeCookie.DisplayName = organization.DisplayName
|
||||||
}
|
}
|
||||||
|
|
||||||
return organizationThemeCookie, nil
|
return organizationThemeCookie, nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user