applied change suggested by reviewer: use String.prototype.includes

(cherry picked from commit 546afb189e)
This commit is contained in:
Sascha Szott
2024-08-29 16:24:38 +02:00
committed by github-actions[bot]
parent a721f8c41e
commit 4669d8f760

View File

@@ -120,7 +120,7 @@
// 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){