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
  • Loading branch information
saschaszott authored Aug 29, 2024
1 parent 002e637 commit 546afb1
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 546afb1

Please sign in to comment.