mirror of
https://github.com/HangarMC/Hangar.git
synced 2024-12-21 06:51:19 +08:00
fix: NPE when language or theme is null
This commit is contained in:
parent
14865d3004
commit
e920ea50b6
@ -40,6 +40,7 @@ import io.papermc.hangar.service.internal.users.invites.ProjectInviteService;
|
||||
import jakarta.servlet.http.Cookie;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.Objects;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@ -158,7 +159,7 @@ public class HangarUserController extends HangarComponent {
|
||||
throw new HangarApiException(HttpStatus.NOT_FOUND);
|
||||
}
|
||||
// if nothing changed, then nothing changed!
|
||||
if (userTable.getLanguage().equals(settings.getLanguage()) && userTable.getTheme().equals(settings.getTheme())) {
|
||||
if (Objects.equals(userTable.getLanguage(),settings.getLanguage()) && Objects.equals(userTable.getTheme(), settings.getTheme())) {
|
||||
setThemeCookie(settings, response);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user