Skip to content

Commit

Permalink
removes empty list entries (#1523)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludy87 authored Jul 4, 2024
1 parent 2971425 commit 1c90b65
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class AccountWebController {

@GetMapping("/login")
public String login(HttpServletRequest request, Model model, Authentication authentication) {

if (authentication != null && authentication.isAuthenticated()) {
return "redirect:/";
}
Expand Down Expand Up @@ -72,6 +73,10 @@ public String login(HttpServletRequest request, Model model, Authentication auth
}
}
}
// Remove any null keys/values from the providerList
providerList
.entrySet()
.removeIf(entry -> entry.getKey() == null || entry.getValue() == null);
model.addAttribute("providerlist", providerList);

model.addAttribute("loginMethod", applicationProperties.getSecurity().getLoginMethod());
Expand Down

0 comments on commit 1c90b65

Please sign in to comment.