mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 07:23:08 +00:00
applied change suggested by reviewer: use String.prototype.includes
(cherry picked from commit 546afb189e
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
a721f8c41e
commit
4669d8f760
@@ -120,7 +120,7 @@
|
|||||||
// Check for WWW-Authenticate header. If found, this means we are not yet authenticated, and
|
// Check for WWW-Authenticate header. If found, this means we are not yet authenticated, and
|
||||||
// therefore we need to display available authentication options.
|
// therefore we need to display available authentication options.
|
||||||
var authenticate = xhr.getResponseHeader("WWW-Authenticate");
|
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 element = $('div.other-login-methods');
|
||||||
var realms = authenticate.match(/(\w+ (\w+=((".*?")|[^,]*)(, )?)*)/g);
|
var realms = authenticate.match(/(\w+ (\w+=((".*?")|[^,]*)(, )?)*)/g);
|
||||||
if (realms.length === 1){
|
if (realms.length === 1){
|
||||||
|
Reference in New Issue
Block a user