Skip to content

Commit

Permalink
applied change suggested by reviewer: use String.prototype.includes
Browse files Browse the repository at this point in the history
(cherry picked from commit 546afb1)
  • Loading branch information
saschaszott authored and github-actions[bot] committed Oct 8, 2024
1 parent 058f878 commit c468e48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dspace-server-webapp/src/main/resources/static/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ <h3>Other login methods:</h3>
// Check for WWW-Authenticate header. If found, this means we are not yet authenticated, and
// therefore we need to display available authentication options.
var authenticate = xhr.getResponseHeader("WWW-Authenticate");
if (authenticate !== null && authenticate.contains('location=')) {
if (authenticate !== null && authenticate.includes('location=')) {
var element = $('div.other-login-methods');
var realms = authenticate.match(/(\w+ (\w+=((".*?")|[^,]*)(, )?)*)/g);
if (realms.length === 1){
Expand Down

0 comments on commit c468e48

Please sign in to comment.